dict type contact

This commit is contained in:
Frédéric FRANCE 2025-01-29 09:14:13 +01:00
parent 3f1efcfb53
commit 40d8bea77e
No known key found for this signature in database
GPG Key ID: C06E4A9656127239
2 changed files with 10 additions and 3 deletions

View File

@ -1638,9 +1638,9 @@ class Commande extends CommonOrder
$product = new Product($this->db);
$result = $product->fetch($fk_product);
if ($qty < $product->packaging) {
$qty = $product->packaging;
$qty = (float) $product->packaging;
} else {
if (!empty($product->packaging) && (fmod((float) $qty, $product->packaging) > 0.000001)) {
if (!empty($product->packaging) && (fmod((float) $qty, (float) $product->packaging) > 0.000001)) {
$coeff = intval((float) $qty / $product->packaging) + 1;
$qty = (float) $product->packaging * $coeff;
setEventMessages($langs->trans('QtyRecalculatedWithPackaging'), null, 'mesgs');

View File

@ -42,6 +42,13 @@ ALTER TABLE llx_societe_account ADD UNIQUE INDEX uk_societe_account_login_websit
-- V22 migration
-- fix element
UPDATE llx_c_type_contact set element='shipping' WHERE element='expedition';
-- Shipment / Expedition
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('shipping', 'internal', 'SALESREPFOLL', 'Responsable suivi de l''expédition', 1);
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('shipping', 'external', 'CUSTOMER', 'Customer shipping contact', 1);
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('shipping', 'external', 'SHIPPING', 'Loading facility', 1);
insert into llx_c_type_contact (element, source, code, libelle, active ) values ('shipping', 'external', 'DELIVERY', 'Delivery facility', 1);
ALTER TABLE llx_holiday_config DROP INDEX idx_holiday_config;
ALTER TABLE llx_holiday_config ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
@ -49,4 +56,4 @@ ALTER TABLE llx_holiday_config ADD UNIQUE INDEX idx_holiday_config (entity, name
ALTER TABLE llx_societe_account ADD COLUMN ip varchar(250);
ALTER TABLE llx_product ADD COLUMN packaging float(24,8) DEFAULT NULL;
ALTER TABLE llx_product ADD COLUMN packaging float(24,8) DEFAULT NULL;