fix : cancel invoice now revert erp status from 4 to 3

pull/6221/head
Gauthier LO 2023-08-21 17:54:36 +02:00
parent cd4ad1e5fe
commit e57aea61f0
2 changed files with 20 additions and 4 deletions

View File

@ -286,7 +286,11 @@
shipping_fee = NULL,
service_fee = NULL,
vat = NULL,
purchase_fee = 0.0
purchase_fee = 0.0,
erp_status =
CASE erp_status
WHEN 4 THEN 3
END
WHERE platform_order_id IN (SELECT id FROM platform_order WHERE shipping_invoice_number = #{invoiceNumber});
</update>
<update id="cancelBatchInvoice">
@ -295,7 +299,11 @@
shipping_fee = NULL,
service_fee = NULL,
vat = NULL,
purchase_fee = 0.0
purchase_fee = 0.0,
erp_status =
CASE erp_status
WHEN 4 THEN 3
END
WHERE platform_order_id IN
(SELECT id FROM platform_order
WHERE shipping_invoice_number IN

View File

@ -594,7 +594,11 @@
order_service_fee = NULL,
shipping_invoice_number = NULL,
picking_fee = 0.0,
packaging_material_fee = 0.0
packaging_material_fee = 0.0,
erp_status =
CASE erp_status
WHEN 4 THEN 3
END
WHERE shipping_invoice_number = #{invoiceNumber};
</update>
<update id="cancelBatchInvoice">
@ -603,7 +607,11 @@
order_service_fee = NULL,
shipping_invoice_number = NULL,
picking_fee = 0.0,
packaging_material_fee = 0.0
packaging_material_fee = 0.0,
erp_status =
CASE erp_status
WHEN 4 THEN 3
END
WHERE shipping_invoice_number IN
<foreach collection="invoiceNumbers" separator="," open="(" close=")" index="index" item="invoiceNumber">
#{invoiceNumber}