From 7e581befd3276aa17942182f55579d5f87e6c08f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 7 May 2025 15:14:51 -0300 Subject: [PATCH] Bug 39858: Fix saving vendors with invoices This patch makes the form remove the `invoices_count` attribute from the object before sending it to the API. To test: 1. Have a vendor with some invoice 2. Edit the vendor to add a contact (for example) 3. Click 'Submit' => FAIL: Error, cannot be saved 4. Apply this patch 5. Rebuild the Vue assets: $ ktd --shell k$ yarn js:build 6. Restart: k$ restart_all 7. Reload the browser page and edit the vendor 8. Click 'Submit' => SUCCESS: It saved 9. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: Roman Dolny --- .../prog/js/vue/components/Vendors/VendorFormAdd.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue index 3c042ca82d..e5e7a38474 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorFormAdd.vue @@ -131,6 +131,7 @@ export default { delete vendor.baskets_count; delete vendor.subscriptions; delete vendor.contracts; + delete vendor.invoices_count; if (!this.discountValid) errors.push(this.$__("Invalid discount value")); -- 2.39.5