mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-24 04:26:38 +00:00
get_item_lead_time computed the manufacturing lead time as 1440 / manufacturing_time_in_mins + buffer_time. Both columns are Int, so integer/integer division truncates on PostgreSQL (1440/7 -> 205) while MariaDB yields a decimal (205.71). The value feeds math.ceil() and then release_date = add_days(delivery_date, -lead_time), so a user could see a release date that differs by a day between engines. Make the numerator a float literal (1440.0) so both engines do decimal division. MariaDB already returned a decimal, so its output is unchanged; PostgreSQL now matches it.