accounting-engine 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accounting-engine",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Bu paket, verilen faturanın, belirtilen kurallar çerçevesinde muhasebeleştirilmesini kolaylaştırmak adına oluşturulmuştur.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -147,7 +147,7 @@ const normalizeInvoiceForAccounting = async (invoice, direction) => {
147
147
  type: 'taxable',
148
148
  code: item.code,
149
149
  percent: item.percent,
150
- amount: item.taxable,
150
+ amount: item.code === '0015' ? Number(item.amount) / (Number(item.percent) / 100).toFixed(2) : item.taxable,
151
151
  withholding,
152
152
  });
153
153
  }
@@ -182,7 +182,7 @@ const normalizeInvoiceForAccounting = async (invoice, direction) => {
182
182
  type: 'taxable',
183
183
  code: item.code,
184
184
  percent: item.percent,
185
- amount: item.taxable,
185
+ amount: item.code === '0015' ? Number(item.amount) / (Number(item.percent) / 100).toFixed(2) : item.taxable,
186
186
  withholding: {
187
187
  type: null,
188
188
  code: null,