softseti-sale-calculator-library 3.7.3 → 3.7.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": "softseti-sale-calculator-library",
3
- "version": "3.7.3",
3
+ "version": "3.7.5",
4
4
  "description": "Sales calculation engine by Softseti",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -568,7 +568,7 @@ function calculatePaymentDetails(payment, sale) {
568
568
  original_amount, // Applied amount in payment's original currency
569
569
  original_gived_amount: payment.original_gived_amount, // Original given amount unchanged
570
570
  exchange_rate,
571
- change_amount: roundCurrency(0, gived_amount - amount) // Change in sale currency
571
+ change_amount: roundCurrency(payment.gived_amount - payment.amount) // Change in sale currency
572
572
  };
573
573
  }
574
574