Merge pull request #1714 from Safelite/defect/csr-1945

Defect/csr 1945
This commit is contained in:
chloeherdsafelite 2024-01-31 15:07:04 -05:00 committed by GitHub
commit 9e690697ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,10 +155,9 @@ export default {
...(lineItems.vaps ?? []), ...(lineItems.vaps ?? []),
...(lineItems.promos ?? []), ...(lineItems.promos ?? []),
]; ];
const subtotal = baseMixin.methods.getTotalPriceOfAllLineItemsAndChildParts( const subtotal = baseMixin.methods
combinedLineItems, .getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
false .toFixed(2);
);
// // get correct zip code // // get correct zip code
const providerZip = order.serviceLocation.provider.address.zipCode; const providerZip = order.serviceLocation.provider.address.zipCode;
@ -168,26 +167,25 @@ export default {
: providerZip; : providerZip;
// // calculate total // // calculate total
const total = baseMixin.methods.getTotalPriceOfAllLineItemsAndChildParts( const total = baseMixin.methods
combinedLineItems, .getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, true)
true .toFixed(2);
);
const payload = { const payload = {
serviceZipCode: serviceZip, serviceZipCode: serviceZip,
damageType: order.damage.isRepair ? "repair" : "replace", damageType: order.damage.isRepair ? "repair" : "replace",
accountType: order.payment.isInsurance ? "insurance" : "cash", accountType: order.payment.isInsurance ? "insurance" : "cash",
promoCodes: promoString, promoCodes: promoString,
vehicleYear: order.vehicle.year, vehicleYear: `${order.vehicle.year}`,
vehicleMake: order.vehicle.make, vehicleMake: order.vehicle.make,
vehicleModel: order.vehicle.model, vehicleModel: order.vehicle.model,
vehicleStyle: order.vehicle.style, vehicleStyle: order.vehicle.style,
glassToReplace: glassString, glassToReplace: glassString,
workOrderId: order.workOrderId, workOrderId: parseInt(order.workOrderId),
providerCtu: order.serviceLocation.zipCodeCtu, providerCtu: parseInt(order.serviceLocation.zipCodeCtu),
orderNumber: order.workOrderNumber, orderNumber: order.workOrderNumber,
priceTotal: total, priceTotal: parseFloat(total),
priceSubTotal: subtotal, priceSubTotal: parseFloat(subtotal),
isRecalibrationOnOrder: store.getters.isRecalibrationOnSubmittedOrder, isRecalibrationOnOrder: store.getters.isRecalibrationOnSubmittedOrder,
appointmentType: order.serviceLocation.appointmentType, appointmentType: order.serviceLocation.appointmentType,
}; };