To verify: - Go to Home > Acquisitions - Edit an invoice that has no shipping date - Change shipment cost. Leave shipping date empty - Save Result: Page reloads, shipment cost keeps old value. Warnings in intranet-error.log
Created attachment 45700 [details] [review] Bug 15376: Edit invoices: Can not change Shipping cost To reproduce: - Go to Home > Acquisitions - Edit an invoice that has no shipping date - Change shipment cost. Leave shipping date empty - Save Result: Page reloads, shipment cost keeps old value. Warnings in intranet-error.log To test: - Apply patch - Follow steps above Result: Shipment costs are changed as expected No warnings in intrante-error.log
Created attachment 45701 [details] [review] Bug 15376: Edit invoices: Can not change Shipping cost To reproduce: - Go to Home > Acquisitions - Edit an invoice that has no shipping date - Change shipment cost. Leave shipping date empty - Save Result: Page reloads, shipment cost keeps old value. Warnings in intranet-error.log To test: - Apply patch - Follow steps above Result: Shipment costs are changed as expected No warnings in intrante-error.log Additionally, verify that the input field 'Shipping cost' is properly formatted and that in invoice details 'Shipment cost' is replaced by 'Shipping cost'
Created attachment 45709 [details] [review] Bug 15376: Edit invoices: Can not change Shipping cost To reproduce: - Go to Home > Acquisitions - Edit an invoice that has no shipping date - Change shipment cost. Leave shipping date empty - Save Result: Page reloads, shipment cost keeps old value. Warnings in intranet-error.log To test: - Apply patch - Follow steps above Result: Shipment costs are changed as expected No warnings in intrante-error.log Additionally, verify that the input field 'Shipping cost' is properly formatted and that in invoice details 'Shipment cost' is replaced by 'Shipping cost' Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Confirm bug and solution
Comment on attachment 45709 [details] [review] Bug 15376: Edit invoices: Can not change Shipping cost Review of attachment 45709 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ +80,4 @@ > <input type="text" size="10" id="billingdate" name="billingdate" value="[% billingdate | $KohaDates %]" readonly="readonly" class="datepicker" /></li> > > <li><label for="shipmentcost">Shipping cost:</label> > + <input type="text" size="10" id="shipmentcost" name="shipmentcost" value="[% shipmentcost | $Price %]" /></li> I have not tried the patch but Price should be called with the on_editing flag set when it's used for an input field.
Created attachment 45718 [details] [review] Bug 15376: (followup) Set on_editing flag See comment #4
I don't get the issue on master, please provide a more detail test plan.
I followed the test plan. And can (also) change the shipping cost for an invoice without shipment date in current master.
I followed test plan and can't reproduce this bug either.
The error no longer appears on current master. I had a look at the database: When I filed the bug, the error occured with records where shipmentdate = NULL. The current behaviour is that a record with shipmentdate = NULL has now shipmentdate = 0000-00-00 after saving with an empty field 'shipmentdate'. More testing: If I receive a shipment and save with an empty shipmentdate, the shipmentdate gets a NULL in the database (and billingdate / closedate as well). Additionally: If I edit this record and save it without changing any values (leaving shipmentdate and billingdate empty), shipmentdate turns to 0000-00-00 but billingdate is still NULL. I would expect that both dates behave the same. (BTW: While saving I get a log entry 'invoice.pl: Use of uninitialized value in concatenation (.) or string at .../invoice.tt line 79) So we have two different values for "empty date" in the table aqinvoices: NULL and 0000-00-00. @Jonathan: What dou you think about 0000-00-00 vs NULL? If I look at Bugzilla I see a couple of Bugs regarding 0000-00-00.
Re-tested on current master, I can no longer reproduce the issue.