Merge pull request #13799 from bb2a/PRODUCT_PRICE_BASE_TYPE
NEW Can set type of price without tax) per defaut for new sale price creation
This commit is contained in:
commit
27a85a1971
@ -97,3 +97,9 @@ insert into llx_const (name, value, type, visible, entity) VALUES ('CONTRACT_ADD
|
|||||||
insert into llx_const (name, value, type, visible, entity) VALUES ('USERGROUP_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/usergroups', 'chaine', 0, 1);
|
insert into llx_const (name, value, type, visible, entity) VALUES ('USERGROUP_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/usergroups', 'chaine', 0, 1);
|
||||||
insert into llx_const (name, value, type, visible, entity) VALUES ('USER_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/users', 'chaine', 0, 1);
|
insert into llx_const (name, value, type, visible, entity) VALUES ('USER_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/users', 'chaine', 0, 1);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- PRODUCTS
|
||||||
|
--
|
||||||
|
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0);
|
||||||
|
|
||||||
|
|||||||
@ -46,4 +46,7 @@ UPDATE llx_establishment SET ref = rowid WHERE ref IS NULL;
|
|||||||
ALTER TABLE llx_establishment MODIFY COLUMN ref varchar(30) NOT NULL;
|
ALTER TABLE llx_establishment MODIFY COLUMN ref varchar(30) NOT NULL;
|
||||||
ALTER TABLE llx_establishment MODIFY COLUMN name varchar(128);
|
ALTER TABLE llx_establishment MODIFY COLUMN name varchar(128);
|
||||||
|
|
||||||
|
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0);
|
||||||
|
|
||||||
ALTER TABLE llx_subscription MODIFY COLUMN datef DATETIME;
|
ALTER TABLE llx_subscription MODIFY COLUMN datef DATETIME;
|
||||||
|
|
||||||
|
|||||||
@ -106,6 +106,7 @@ NoteNotVisibleOnBill=Note (not visible on invoices, proposals...)
|
|||||||
ServiceLimitedDuration=If product is a service with limited duration:
|
ServiceLimitedDuration=If product is a service with limited duration:
|
||||||
MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment)
|
MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment)
|
||||||
MultiPricesNumPrices=Number of prices
|
MultiPricesNumPrices=Number of prices
|
||||||
|
DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices
|
||||||
AssociatedProductsAbility=Activate virtual products (kits)
|
AssociatedProductsAbility=Activate virtual products (kits)
|
||||||
AssociatedProducts=Virtual products
|
AssociatedProducts=Virtual products
|
||||||
AssociatedProductsNumber=Number of products composing this virtual product
|
AssociatedProductsNumber=Number of products composing this virtual product
|
||||||
|
|||||||
@ -106,6 +106,7 @@ NoteNotVisibleOnBill=Note (non visible sur les factures, propals...)
|
|||||||
ServiceLimitedDuration=Si produit de type service à durée limitée :
|
ServiceLimitedDuration=Si produit de type service à durée limitée :
|
||||||
MultiPricesAbility=Plusieurs niveaux de prix par produit/service (chaque client est dans un et un seul niveau)
|
MultiPricesAbility=Plusieurs niveaux de prix par produit/service (chaque client est dans un et un seul niveau)
|
||||||
MultiPricesNumPrices=Nombre de prix
|
MultiPricesNumPrices=Nombre de prix
|
||||||
|
DefaultPriceType=Type de prix par default
|
||||||
AssociatedProductsAbility=Pris en charge des produits virtuels (kits)
|
AssociatedProductsAbility=Pris en charge des produits virtuels (kits)
|
||||||
AssociatedProducts=Produits virtuels
|
AssociatedProducts=Produits virtuels
|
||||||
AssociatedProductsNumber=Nbre de sous-produits constituant ce produit virtuel
|
AssociatedProductsNumber=Nbre de sous-produits constituant ce produit virtuel
|
||||||
|
|||||||
@ -124,6 +124,9 @@ if ($action == 'other')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$value = GETPOST('price_base_type', 'alpha');
|
||||||
|
$res = dolibarr_set_const($db, "PRODUCT_PRICE_BASE_TYPE", $value, 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
$value = GETPOST('PRODUIT_SOUSPRODUITS', 'alpha');
|
$value = GETPOST('PRODUIT_SOUSPRODUITS', 'alpha');
|
||||||
$res = dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $value, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $value, 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
@ -571,6 +574,14 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Default product price base type
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
print '<td>'.$langs->trans("DefaultPriceType").'</td>';
|
||||||
|
print '<td width="60" class="right">';
|
||||||
|
print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type");
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// sousproduits activation/desactivation
|
// sousproduits activation/desactivation
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -1176,7 +1176,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
// Price
|
// Price
|
||||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("SellingPrice").'</td>';
|
print '<tr><td class="titlefieldcreate">'.$langs->trans("SellingPrice").'</td>';
|
||||||
print '<td><input name="price" class="maxwidth50" value="'.$object->price.'">';
|
print '<td><input name="price" class="maxwidth50" value="'.$object->price.'">';
|
||||||
print $form->selectPriceBaseType($object->price_base_type, "price_base_type");
|
print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Min price
|
// Min price
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user