Merge pull request #13354 from OPEN-DSI/new-takepos-reduction-global-labels
NEW labels on reduction buttons in cash desk
This commit is contained in:
commit
a141f46e91
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -77,6 +77,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>
|
||||
@ -87,6 +95,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
|
||||
@ -98,8 +109,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,14 +139,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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,11 +213,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