@asumano/worklip-typeorm-db 1.1.56 → 1.1.57
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/dist/visit.summary.d.ts +1 -1
- package/dist/visit.summary.js +9 -5
- package/package.json +1 -1
package/dist/visit.summary.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export interface IPropsBuildVisitSummary {
|
|
|
74
74
|
isTaxIncluded: boolean;
|
|
75
75
|
}
|
|
76
76
|
export declare const buildVisitSummary: (data: IVisitData | null | undefined, { servicePrice, taxPercentage, isTaxIncluded }: IPropsBuildVisitSummary) => IVisitSummary;
|
|
77
|
-
export declare const getTaxConfig: (companyDetails: any
|
|
77
|
+
export declare const getTaxConfig: (companyDetails: any) => {
|
|
78
78
|
taxPercentage: number;
|
|
79
79
|
isTaxIncluded: boolean;
|
|
80
80
|
};
|
package/dist/visit.summary.js
CHANGED
|
@@ -124,13 +124,17 @@ const buildVisitSummary = (data, { servicePrice, taxPercentage, isTaxIncluded })
|
|
|
124
124
|
};
|
|
125
125
|
};
|
|
126
126
|
exports.buildVisitSummary = buildVisitSummary;
|
|
127
|
-
// DOC: Configuración de impuesto de la empresa dueña de la visita
|
|
128
|
-
//
|
|
129
|
-
|
|
127
|
+
// DOC: Configuración de impuesto de la empresa dueña de la visita. Si la empresa no
|
|
128
|
+
// definió una tarifa, NO se cobra impuesto.
|
|
129
|
+
//
|
|
130
|
+
// La tarifa del país NO se hereda a propósito: es solo una referencia que la
|
|
131
|
+
// pantalla de empresa muestra para que sepan cuánto poner al activarlo. Cobrarle
|
|
132
|
+
// impuesto a alguien que nunca se pronunció, y que además se moviera solo si el
|
|
133
|
+
// país cambia su tarifa, es un comportamiento que nadie pidió.
|
|
134
|
+
const getTaxConfig = (companyDetails) => {
|
|
130
135
|
const company = companyDetails || {};
|
|
131
|
-
const country = countryDetails || {};
|
|
132
136
|
return {
|
|
133
|
-
taxPercentage: Number(company.tax_percentage ??
|
|
137
|
+
taxPercentage: Number(company.tax_percentage ?? 0) || 0,
|
|
134
138
|
isTaxIncluded: company.is_tax_included ?? true,
|
|
135
139
|
};
|
|
136
140
|
};
|