NEW add const TAKEPOS_NUMPAD_USE_PAYMENT_ICON to use icons on payment buttons

This commit is contained in:
VESSILLER 2020-03-11 15:36:36 +01:00
parent e2a918b9d2
commit fc4a98b29c
4 changed files with 18 additions and 9 deletions

View File

@ -91,3 +91,4 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit
PrintMethod=Print method
ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud.
ByTerminal=By terminal
TakeposNumpadUsePaymentIcon=Use payment icon on numpad

View File

@ -82,3 +82,4 @@ ReceiptName=Nom du reçu
ProductSupplements=Suppléments de produit
SupplementCategory=Catégorie des suppléments
SortProductField=Champ pour le tri des produits
TakeposNumpadUsePaymentIcon=Utilisation d'icônes sur les touches des modes de règlement du pavé numérique

View File

@ -201,6 +201,13 @@ $array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad")
print $form->selectarray('TAKEPOS_NUMPAD', $array, (empty($conf->global->TAKEPOS_NUMPAD) ? '0' : $conf->global->TAKEPOS_NUMPAD), 0);
print "</td></tr>\n";
// Numpad use payment icons
print '<tr class="oddeven"><td>';
print $langs->trans('TakeposNumpadUsePaymentIcon');
print '<td colspan="2">';
print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0);
print "</td></tr>\n";
// Direct Payment
print '<tr class="oddeven"><td>';
print $langs->trans('DirectPaymentButton');

View File

@ -260,13 +260,13 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
$payIcon = '';
if ($paycode == 'LIQ') {
$paycode = 'cash';
$payIcon = 'coins';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins';
} elseif ($paycode == 'CB') {
$paycode = 'card';
$payIcon = 'credit-card';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'credit-card';
} elseif ($paycode == 'CHQ') {
$paycode = 'cheque';
$payIcon = 'money-check';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check';
}
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">' . (!empty($payIcon) ? '<span class="fa fa-2x fa-' . $payIcon . '"></span>' : $langs->trans("PaymentTypeShort".$paiements[0]->code)) . '</button>';
@ -283,13 +283,13 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
$payIcon = '';
if ($paycode == 'LIQ') {
$paycode = 'cash';
$payIcon = 'coins';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins';
} elseif ($paycode == 'CB') {
$paycode = 'card';
$payIcon = 'credit-card';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'credit-card';
} elseif ($paycode == 'CHQ') {
$paycode = 'cheque';
$payIcon = 'money-check';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check';
}
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">'. (!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.'"></span>' : $langs->trans("PaymentTypeShort".$paiements[1]->code)) . '</button>';
@ -307,13 +307,13 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
$payIcon = '';
if ($paycode == 'LIQ') {
$paycode = 'cash';
$payIcon = 'coins';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'coins';
} elseif ($paycode == 'CB') {
$paycode = 'card';
$payIcon = 'credit-card';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'credit-card';
} elseif ($paycode == 'CHQ') {
$paycode = 'cheque';
$payIcon = 'money-check';
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) $payIcon = 'money-check';
}
print '<button type="button" class="calcbutton2" onclick="Validate(\''.$langs->trans($paycode).'\');">' . (!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.'"></span>' : $langs->trans("PaymentTypeShort".$paiements[2]->code)) . '</button>';