fix: disabling edit when invoice number not null

pull/8040/head
Gauthier LO 2024-11-22 15:49:05 +01:00
parent f5b88dcc70
commit e528d9f947
1 changed files with 4 additions and 3 deletions

View File

@ -51,9 +51,10 @@
</select>
<update id="updateFee">
UPDATE extra_fee
SET unit_price = #{price},
quantity = #{qty},
description = #{description}
SET unit_price = #{price},
quantity = #{qty},
description =
IF(option_id = (SELECT id FROM extra_fee_option WHERE en_name = 'Autres') AND invoice_number IS NULL, #{description}, description)
WHERE id = #{id};
</update>
</mapper>