Bug 40694 - "Actual cost" on receive displays in false format with CurrencyFormat != US
Summary: "Actual cost" on receive displays in false format with CurrencyFormat != US
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 24.11
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-22 14:29 UTC by Katrin Fischer
Modified: 2025-08-22 14:36 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2025-08-22 14:29:15 UTC
When CurrencyFormat is set to "FR", the actual cost on receiving an item is displayed with a decimal comma in the input field. All input fields need to use a decimal dot or there will be an error on attempting to save the form.

To test:
* Set CurrencyFormat to FR
* Add an order, set a price with some "cents"
* Close basket
* Receive shipment
* Click on receive link - verify the input field has the , instead of the dot
* Try to save without changing - verify error message

At the moment, we need to make sure all input fields are using the . not , until we can make a global change.
Comment 1 Katrin Fischer 2025-08-22 14:36:25 UTC
It looks like this might be the fix:

                 if(invoiceincgst == "1") {
                     rrp_txt = Number(row.rrp_tax_included).format_price()+'<span class="hint"> '+ADJ_TAX_INC.format(active_currency)+"</span>";
                     ecost_txt = Number(row.ecost_tax_included).format_price()+'<span class="hint"> '+TAX_INC+"</span>";
-                    $("#unitprice").val(row.unit_price_tax_included > 0 ? Number(row.unit_price_tax_included).format_price() : Number(row.ecost_tax_included).format_price());
+                    $("#unitprice").val(row.unit_price_tax_included > 0 ? Number(row.unit_price_tax_included) : Number(row.ecost_tax_included));
                     $("#unitprice_hint").html(TAX_INC);
                 } else {
                     rrp_txt = Number(row.rrp_tax_excluded).format_price()+'<span class="hint"> '+ADJ_TAX_EXC.format(active_currency)+"</span>";
                     ecost_txt = Number(row.ecost_tax_excluded).format_price()+'<span class="hint"> '+TAX_EXC+"</span>";
-                    $("#unitprice").val(row.unit_price_tax_excluded > 0 ? Number(row.unit_price_tax_excluded).format_price() : Number(row.ecost_tax_excluded).format_price());
+                    $("#unitprice").val(row.unit_price_tax_excluded > 0 ? Number(row.unit_price_tax_excluded) : Number(row.ecost_tax_excluded));
                     $("#unitprice_hint").html(TAX_EXC);
                 }