Skip to content

Commit

Permalink
bug(Stock Adjustment sort)
Browse files Browse the repository at this point in the history
- Adding property type:number for sort column old quantity by
  numerically

closes #5806
  • Loading branch information
lomamech committed Aug 4, 2021
1 parent c6c8686 commit f9e7fbd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function StockInventoryAdjustmentController(
displayName : 'INVENTORY_ADJUSTMENT.OLD_QUANTITY',
headerCellFilter : 'translate',
enableFiltering : false,
type : 'number',
}, {
field : 'quantity',
width : 180,
Expand Down
10 changes: 9 additions & 1 deletion server/lib/template/helpers/finance.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ const EUR_FMT = {
format : '%v %s', // value before symbol
};

const FORMATS = [null, FC_FMT, USD_FMT, EUR_FMT]; // NB: Indeces must match currency IDs in database
const ROUBLE_FMT = {
symbol : '₽',
precision : 2,
thousand : ' ', // thin non-breaking space
decimal : ',',
format : '%v %s', // value before symbol
};

const FORMATS = [null, FC_FMT, USD_FMT, EUR_FMT, ROUBLE_FMT]; // NB: Indeces must match currency IDs in database

/** @todo use the currency filter fork written for the client to perform the same behaviour here */
function currency(value = 0, currencyId, digit) {
Expand Down

0 comments on commit f9e7fbd

Please sign in to comment.