https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40387

David Nind <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #184379|0                           |1
        is obsolete|                            |

--- Comment #5 from David Nind <[email protected]> ---
Created attachment 184414
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184414&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 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to