Skip to content

Commit

Permalink
Display alert if order total is under order min amount
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-maxime committed Jan 20, 2018
1 parent 6f248a6 commit 9899a02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion htdocs/commande/card.php
Expand Up @@ -2388,8 +2388,12 @@
}

// 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>';
Expand Down
6 changes: 5 additions & 1 deletion htdocs/fourn/commande/card.php
Expand Up @@ -2052,8 +2052,12 @@
}

// 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
Expand Down

0 comments on commit 9899a02

Please sign in to comment.