softseti-sale-calculator-library 4.0.0 → 4.0.1
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
|
@@ -835,7 +835,7 @@ async function getApplicableDwTaxes(sale) {
|
|
|
835
835
|
product_index: productIndex,
|
|
836
836
|
sum: netAmount,
|
|
837
837
|
amount: taxAmount,
|
|
838
|
-
rate: adjustedRate,
|
|
838
|
+
rate: adjustedRate,
|
|
839
839
|
original_rate: tax.rate,
|
|
840
840
|
tax_type: tax.product_id ? 'specific' : 'general',
|
|
841
841
|
adjusted_by_rule: adjustedRate !== tax.rate
|
|
@@ -843,7 +843,6 @@ async function getApplicableDwTaxes(sale) {
|
|
|
843
843
|
|
|
844
844
|
taxBatches.push(taxBatch);
|
|
845
845
|
|
|
846
|
-
// Usar adjustedRate en el mapa de impuestos
|
|
847
846
|
const mapTaxKey = `${tax.id}-${adjustedRate}-${tax.abbreviation}`;
|
|
848
847
|
|
|
849
848
|
if (taxMap[mapTaxKey]) {
|
|
@@ -853,13 +852,12 @@ async function getApplicableDwTaxes(sale) {
|
|
|
853
852
|
taxMap[mapTaxKey] = {
|
|
854
853
|
id: tax.id,
|
|
855
854
|
abbreviation: tax.abbreviation,
|
|
856
|
-
rate: adjustedRate,
|
|
855
|
+
rate: adjustedRate,
|
|
857
856
|
original_rate: tax.rate,
|
|
858
857
|
amount: taxAmount,
|
|
859
858
|
product_id: tax.product_id || null,
|
|
860
859
|
batches: [taxBatch],
|
|
861
|
-
adjusted_by_rule: adjustedRate !== tax.rate
|
|
862
|
-
rule_applied: convertedRuleTaxes.length > 0 ? 'f8147b8a-ad51-46e8-884d-c3374efc9b00' : null
|
|
860
|
+
adjusted_by_rule: adjustedRate !== tax.rate
|
|
863
861
|
};
|
|
864
862
|
}
|
|
865
863
|
}
|