summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-21 13:17:38 +0300
committereug-vs <eug-vs@keemail.me>2021-03-21 13:17:38 +0300
commitf34d29c80850bdf582d1568dc98ae67d1895f082 (patch)
treeaeff26829e35e9796daac74d32b93e73e63c8895
parent4940f77145a6b3bfb7c3abb14dd35d1e5e306148 (diff)
downloadcommercel-api-f34d29c80850bdf582d1568dc98ae67d1895f082.tar.gz
feat: use rubles as units
-rw-r--r--src/services/transfers.service.ts2
-rw-r--r--src/services/waybills.service.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/services/transfers.service.ts b/src/services/transfers.service.ts
index e2c70e4..77fef8a 100644
--- a/src/services/transfers.service.ts
+++ b/src/services/transfers.service.ts
@@ -21,7 +21,7 @@ const populateSchema = {
const addFields = (item: any) => {
const { operation, contractor, amount } = item;
const op = operation === 'in' ? 'приход' : 'расход';
- const name = `Перевод: ${op} $${amount} от ${contractor.name}`;
+ const name = `Перевод: ${op} ${amount}р от ${contractor.name}`;
return { ...item, name };
};
diff --git a/src/services/waybills.service.ts b/src/services/waybills.service.ts
index 8fb6ef4..66225ac 100644
--- a/src/services/waybills.service.ts
+++ b/src/services/waybills.service.ts
@@ -62,7 +62,7 @@ const addFields = (item: WaybillSchema) => {
const { operation, records, date } = item;
const total = item.records.reduce((sum, record) => sum + record.price * record.quantity, 0);
const op = operation === 'in' ? 'приход' : 'расход';
- const name = `Накладная: ${op} $${total}`;
+ const name = `Накладная: ${op} ${total}р`;
return { ...item, name, total };
};