https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40387 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184414|0 |1 is obsolete| | Attachment #184415|0 |1 is obsolete| | Attachment #184416|0 |1 is obsolete| | Attachment #184417|0 |1 is obsolete| | Attachment #184539|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184544 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184544&action=edit Bug 40387: Fix undefined tax rate warnings in EDI invoice processing When processing EDI invoices without TAX segments, warnings were generated due to undefined tax rates in multiplication operations. The tax_rate() method in Koha::Edifact::Line correctly returns undef when no TAX segments are present in the EDI message. However, the invoice processing code in Koha::EDI didn't handle this case properly. This patch fixes the issue by: - Adding checks for undefined tax rates before using them in calculations - Defaulting to 0 tax rate when no tax information is present - Ensuring tax_value calculations use 0 instead of undefined values This eliminates "Use of uninitialized value in multiplication" warnings while maintaining correct processing of invoices without tax information. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.