mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Enable extrafields for customer order, proposal and invoice lines. This
feature was developed for 3.5 but was disabled (hidden) because of a bug not possible to fix enough quickly for 3.5.0 release.
This commit is contained in:
@@ -599,7 +599,7 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
//Extrafields
|
||||
$extrafieldsline = new ExtraFields($db);
|
||||
$extralabelsline =$extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline,$predef);
|
||||
//Unset extrafield
|
||||
if (is_array($extralabelsline))
|
||||
{
|
||||
@@ -613,12 +613,12 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
if ((empty($idprod) || GETPOST('usenewaddlineform')) && ($price_ht < 0) && ($qty < 0))
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error = true;
|
||||
$error++;
|
||||
}
|
||||
if (empty($idprod) && GETPOST('type') < 0)
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors');
|
||||
$error = true;
|
||||
$error++;
|
||||
}
|
||||
if ((empty($idprod) || GETPOST('usenewaddlineform')) && (!($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not ''
|
||||
{
|
||||
@@ -628,12 +628,12 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
if ($qty == '')
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors');
|
||||
$error = true;
|
||||
$error++;
|
||||
}
|
||||
if (empty($idprod) && empty($product_desc))
|
||||
{
|
||||
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors');
|
||||
$error = true;
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod)))
|
||||
@@ -2484,7 +2484,7 @@ else
|
||||
}
|
||||
|
||||
// Create bill and Classify billed
|
||||
// Note: Even if module invoice is not enabled, we should be able to use button "Classified billed"
|
||||
// Note: Even if module invoice is not enabled, we should be able to use button "Classified billed"
|
||||
if ($object->statut > 0 && ! $object->billed)
|
||||
{
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER))
|
||||
|
||||
Reference in New Issue
Block a user