Display alert if order total is under order min amount
This commit is contained in:
parent
6f248a6590
commit
9899a02630
@ -2388,8 +2388,12 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
}
|
||||
|
||||
// Total HT
|
||||
$alert = '';
|
||||
if($object->total_ht < $object->thirdparty->order_min_amount) {
|
||||
$alert = ' ' . img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount));
|
||||
}
|
||||
print '<tr><td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
|
||||
print '<td>' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '<td>' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . $alert . '</td>';
|
||||
|
||||
// Total VAT
|
||||
print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||
|
||||
@ -2052,8 +2052,12 @@ elseif (! empty($object->id))
|
||||
}
|
||||
|
||||
// Total
|
||||
$alert = '';
|
||||
if($object->total_ht < $object->thirdparty->supplier_order_min_amount) {
|
||||
$alert = ' ' . img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->supplier_order_min_amount));
|
||||
}
|
||||
print '<tr><td class="titlefieldmiddle">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td>'.price($object->total_ht,'',$langs,1,-1,-1,$conf->currency).'</td>';
|
||||
print '<td>'.price($object->total_ht,'',$langs,1,-1,-1,$conf->currency).$alert.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Total VAT
|
||||
|
||||
Loading…
Reference in New Issue
Block a user