NEW labels on reduction buttons in cash desk
This commit is contained in:
parent
621c4ff4e7
commit
5a4bd28417
@ -119,7 +119,7 @@ button.calcbutton2 {
|
||||
width: calc(25% - 2px);
|
||||
height: calc(25% - 2px);
|
||||
font-weight: bold;
|
||||
font-size: 8pt;
|
||||
font-size: 10pt;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
|
||||
@ -73,6 +73,14 @@ $arrayofjs = array();
|
||||
top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss);
|
||||
|
||||
$langs->loadLangs(array('main', 'bills', 'cashdesk'));
|
||||
|
||||
if (!empty($conf->global->TAKEPOS_NUMPAD_USE_PAYMENT_ICON)) {
|
||||
$htmlReductionPercent = '<span class="fa fa-2x fa-percent"></span>';
|
||||
$htmlReductionAmount = '<span class="fa fa-2x fa-money"></span>';
|
||||
} else {
|
||||
$htmlReductionPercent = $langs->trans('ReductionShort') . '<br>%';
|
||||
$htmlReductionAmount = $langs->trans('ReductionShort') . '<br>' . $langs->trans('Amount');
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="css/pos.css.php">
|
||||
</head>
|
||||
@ -83,6 +91,9 @@ $langs->loadLangs(array('main', 'bills', 'cashdesk'));
|
||||
var reductionTotal = '';
|
||||
var editAction = '';
|
||||
var editNumber = '';
|
||||
var htmlBtnOK = '<span style="font-size: 14pt;">OK</span>';
|
||||
var htmlReductionPercent = '<?php echo dol_escape_js($htmlReductionPercent); ?>';
|
||||
var htmlReductionAmount = '<?php echo dol_escape_js($htmlReductionAmount); ?>';
|
||||
|
||||
/**
|
||||
* Reset values
|
||||
@ -94,8 +105,8 @@ $langs->loadLangs(array('main', 'bills', 'cashdesk'));
|
||||
editAction = '';
|
||||
editNumber = '';
|
||||
jQuery('#reduction_total').val(reductionTotal);
|
||||
jQuery("#reduction_type_percent").html('<span class="fa fa-2x fa-percent"></span>');
|
||||
jQuery('#reduction_type_amount').html('<span class="fa fa-2x fa-money-bill-alt"></span>');
|
||||
jQuery("#reduction_type_percent").html(htmlReductionPercent);
|
||||
jQuery('#reduction_type_amount').html(htmlReductionAmount);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -124,14 +135,14 @@ $langs->loadLangs(array('main', 'bills', 'cashdesk'));
|
||||
}
|
||||
|
||||
if (editAction === 'p'){
|
||||
jQuery('#reduction_type_percent').html('<span style="font-size: 14pt;">OK</span>');
|
||||
jQuery('#reduction_type_amount').html('<span class="fa fa-2x fa-money-bill-alt"></span>');
|
||||
jQuery('#reduction_type_percent').html(htmlBtnOK);
|
||||
jQuery('#reduction_type_amount').html(htmlReductionAmount);
|
||||
} else if (editAction === 'a'){
|
||||
jQuery('#reduction_type_amount').html('<span style="font-size: 14pt;">OK</span>');
|
||||
jQuery("#reduction_type_percent").html('<span class="fa fa-2x fa-percent"></span>');
|
||||
jQuery('#reduction_type_amount').html(htmlBtnOK);
|
||||
jQuery("#reduction_type_percent").html(htmlReductionPercent);
|
||||
} else {
|
||||
jQuery('#reduction_type_percent').html('<span class="fa fa-2x fa-percent"></span>');
|
||||
jQuery('#reduction_type_amount').html('<span class="fa fa-2x fa-money-bill-alt"></span>');
|
||||
jQuery('#reduction_type_percent').html(htmlReductionPercent);
|
||||
jQuery('#reduction_type_amount').html(htmlReductionAmount);
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,11 +209,11 @@ $langs->loadLangs(array('main', 'bills', 'cashdesk'));
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(7);">7</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(8);">8</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(9);">9</button>';
|
||||
print '<button type="button" class="calcbutton2" id="reduction_type_percent" onclick="Edit(\'p\');"><span class="fa fa-2x fa-percent"></span></button>';
|
||||
print '<button type="button" class="calcbutton2" id="reduction_type_percent" onclick="Edit(\'p\');">' . $htmlReductionPercent . '</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(4);">4</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(5);">5</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(6);">6</button>';
|
||||
print '<button type="button" class="calcbutton2" id="reduction_type_amount" onclick="Edit(\'a\');"><span class="fa fa-2x fa-money-bill-alt"></span></button>';
|
||||
print '<button type="button" class="calcbutton2" id="reduction_type_amount" onclick="Edit(\'a\');">' . $htmlReductionAmount . '</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(1);">1</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(2);">2</button>';
|
||||
print '<button type="button" class="calcbutton" onclick="AddReduction(3);">3</button>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user