Fix warning

This commit is contained in:
Laurent Destailleur 2023-04-30 04:26:50 +02:00
parent fd3ec20f36
commit d40fe56cb4
13 changed files with 86 additions and 80 deletions

View File

@ -287,7 +287,7 @@ if (count($arrayjs) && $mode == 'memberbycountry') {
print "\tvar container = document.getElementById('".$mode."');\n";
print "\tvar geomap = new google.visualization.GeoMap(container);\n";
print "\tgeomap.draw(data, options);\n";
print "};\n";
print "}\n";
print "</script>\n";
// print the div tag that will contain the map

View File

@ -80,7 +80,7 @@ class DolibarrApi
*
* @param string $field Field name
* @param string $value Value to check/clean
* @param stdClass $object Object
* @param Object $object Object
* @return string Value cleaned
*/
protected function _checkValForAPI($field, $value, $object)

View File

@ -645,7 +645,7 @@ if ($action == 'edit') {
print getDolGlobalString($constname);
}
} else {
print $conf->global->{$constname};
print getDolGlobalString($constname);
}
print '</td></tr>';
}

View File

@ -144,8 +144,8 @@ class BankAccounts extends DolibarrApi
/**
* Create account object
*
* @param array $request_data Request data
* @return int ID of account
* @param array $request_data Request data
* @return int ID of account
*/
public function post($request_data = null)
{

View File

@ -337,9 +337,9 @@ print '</div>';
print '</form>';
print ' <script type="text/javascript">
function increment(){
function increment() {
$(".numvir").nextAll(".hidejs:first").removeClass("hidejs").removeClass("hideobject").addClass("active").show();
};
}
$(".number1").on("click",(function() {
console.log("We click on number1");
$(".hidejs").each(function (){$(this).hide()});

View File

@ -89,16 +89,16 @@ function get_avatar_from_service(service, userid, size) {
if (isNumberOrNot(size)) {
if (size >= 200) {
sizeparam = 'large'
};
}
if (size >= 100 && size < 200) {
sizeparam = 'normal'
};
}
if (size >= 50 && size < 100) {
sizeparam = 'small'
};
}
if (size < 50) {
sizeparam = 'square'
};
}
} else {
sizeparam = size;
}
@ -118,13 +118,13 @@ function get_avatar_from_service(service, userid, size) {
if (isNumberOrNot(size)) {
if (size >= 73) {
sizeparam = 'bigger'
};
}
if (size >= 48 && size < 73) {
sizeparam = 'normal'
};
}
if (size < 48) {
sizeparam = 'mini'
};
}
} else {
sizeparam = size;
}
@ -139,31 +139,31 @@ function get_avatar_from_service(service, userid, size) {
var sizeparam = '';
if (size >= 512) {
sizeparam = 512
};
}
if (size >= 128 && size < 512) {
sizeparam = 128
};
}
if (size >= 96 && size < 128) {
sizeparam = 96
};
}
if (size >= 64 && size < 96) {
sizeparam = 64
};
}
if (size >= 48 && size < 64) {
sizeparam = 48
};
}
if (size >= 40 && size < 48) {
sizeparam = 40
};
}
if (size >= 30 && size < 40) {
sizeparam = 30
};
}
if (size >= 24 && size < 30) {
sizeparam = 24
};
}
if (size < 24) {
sizeparam = 16
};
}
url = "http://api.tumblr.com/v2/blog/" + userid + "/avatar/" + sizeparam;
break;

View File

@ -77,13 +77,13 @@ class mod_reception_moonstone extends ModelNumRefReception
*/
public function getExample()
{
global $conf, $langs, $mysoc;
global $langs, $mysoc;
$old_code_client = $mysoc->code_client;
$old_code_type = $mysoc->typent_code;
$mysoc->code_client = 'CCCCCCCCCC';
$mysoc->typent_code = 'TTTTTTTTTT';
$numExample = $this->getNextValue($mysoc, '');
$numExample = $this->getNextValue($mysoc, null);
$mysoc->code_client = $old_code_client;
$mysoc->typent_code = $old_code_type;
@ -96,13 +96,13 @@ class mod_reception_moonstone extends ModelNumRefReception
/**
* Return next value
*
* @param Societe $objsoc Third party object
* @param Object $reception Reception object
* @return string Value if OK, 0 if KO
* @param Societe $objsoc Third party object
* @param Object|null $reception Reception object
* @return string Value if OK, 0 if KO
*/
public function getNextValue($objsoc, $reception)
{
global $db, $conf;
global $db;
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
@ -113,7 +113,11 @@ class mod_reception_moonstone extends ModelNumRefReception
return 0;
}
$date = $reception->date_reception;
if (!empty($reception)) {
$date = $reception->date_reception;
} else {
$date = dol_now();
}
$numFinal = get_next_value($db, $mask, 'reception', 'ref', '', $objsoc, $date);

View File

@ -662,7 +662,7 @@ class MultiCurrency extends CommonObject
foreach ($TRate as $currency_code => $rate) {
$code = substr($currency_code, 3, 3);
$obj = new MultiCurrency($db);
if ($obj->fetch(null, $code) > 0) {
if ($obj->fetch(0, $code) > 0) {
$obj->updateRate($rate);
} elseif ($addifnotfound) {
$this->addRateFromDolibarr($code, $rate);

View File

@ -1022,7 +1022,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
<div id="topnav" class="topnav">
<div id="topnav-left" class="topnav-left">
<div class="inline-block valignmiddle">
<a class="topnav-terminalhour" onclick="ModalBox('ModalTerminal');">
<a class="topnav-terminalhour" onclick="ModalBox('ModalTerminal')">
<span class="fa fa-cash-register"></span>
<span class="hideonsmartphone">
<?php echo getDolGlobalString("TAKEPOS_TERMINAL_NAME_".$_SESSION["takeposterminal"], $langs->trans("TerminalName", $_SESSION["takeposterminal"])); ?>
@ -1033,7 +1033,7 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
</a>
<?php
if (isModEnabled('multicurrency')) {
print '<a class="valignmiddle tdoverflowmax100" id="multicurrency" onclick="ModalBox(\'ModalCurrency\');" title=""><span class="fas fa-coins paddingrightonly"></span>';
print '<a class="valignmiddle tdoverflowmax100" id="multicurrency" onclick="ModalBox(\'ModalCurrency\')" title=""><span class="fas fa-coins paddingrightonly"></span>';
print '<span class="hideonsmartphone">'.$langs->trans("Currency").'</span>';
print '</a>';
}
@ -1162,19 +1162,19 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
<button type="button" class="calcbutton" onclick="Edit(7);">7</button>
<button type="button" class="calcbutton" onclick="Edit(8);">8</button>
<button type="button" class="calcbutton" onclick="Edit(9);">9</button>
<button type="button" id="qty" class="calcbutton2" onclick="Edit('qty');"><?php echo $langs->trans("Qty"); ?></button>
<button type="button" id="qty" class="calcbutton2" onclick="Edit('qty')"><?php echo $langs->trans("Qty"); ?></button>
<button type="button" class="calcbutton" onclick="Edit(4);">4</button>
<button type="button" class="calcbutton" onclick="Edit(5);">5</button>
<button type="button" class="calcbutton" onclick="Edit(6);">6</button>
<button type="button" id="price" class="calcbutton2" onclick="Edit('p');"><?php echo $langs->trans("Price"); ?></button>
<button type="button" id="price" class="calcbutton2" onclick="Edit('p')"><?php echo $langs->trans("Price"); ?></button>
<button type="button" class="calcbutton" onclick="Edit(1);">1</button>
<button type="button" class="calcbutton" onclick="Edit(2);">2</button>
<button type="button" class="calcbutton" onclick="Edit(3);">3</button>
<button type="button" id="reduction" class="calcbutton2" onclick="Edit('r');"><?php echo $langs->trans("ReductionShort"); ?></button>
<button type="button" id="reduction" class="calcbutton2" onclick="Edit('r')"><?php echo $langs->trans("ReductionShort"); ?></button>
<button type="button" class="calcbutton" onclick="Edit(0);">0</button>
<button type="button" class="calcbutton" onclick="Edit('.');">.</button>
<button type="button" class="calcbutton poscolorblue" onclick="Edit('c');">C</button>
<button type="button" class="calcbutton2 poscolordelete" id="delete" onclick="deleteline();"><span class="fa fa-trash"></span></button>
<button type="button" class="calcbutton" onclick="Edit('.')">.</button>
<button type="button" class="calcbutton poscolorblue" onclick="Edit('c')">C</button>
<button type="button" class="calcbutton2 poscolordelete" id="delete" onclick="deleteline()"><span class="fa fa-trash"></span></button>
</div>
<?php
@ -1343,7 +1343,7 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
foreach ($menus as $menu) {
$i++;
if (count($menus) > 12 and $i == 12) {
echo '<button style="'.(empty($menu['style']) ? '' : $menu['style']).'" type="button" id="actionnext" class="actionbutton" onclick="MoreActions('.count($menus).');">'.$langs->trans("Next").'</button>';
echo '<button style="'.(empty($menu['style']) ? '' : $menu['style']).'" type="button" id="actionnext" class="actionbutton" onclick="MoreActions('.count($menus).')">'.$langs->trans("Next").'</button>';
echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.(empty($menu['action']) ? '' : $menu['action']).'">'.$menu['title'].'</button>';
} elseif ($i > 12) {
echo '<button style="display: none;" type="button" id="action'.$i.'" class="actionbutton" onclick="'.(empty($menu['action']) ? '' : $menu['action']).'">'.$menu['title'].'</button>';
@ -1379,11 +1379,11 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
while ($count < $MAXCATEG) {
?>
<div class="wrapper" <?php if ($count == ($MAXCATEG - 2)) {
echo 'onclick="MoreCategories(\'less\');"';
echo 'onclick="MoreCategories(\'less\')"';
} elseif ($count == ($MAXCATEG - 1)) {
echo 'onclick="MoreCategories(\'more\');"';
echo 'onclick="MoreCategories(\'more\')"';
} else {
echo 'onclick="LoadProducts('.$count.');"';
echo 'onclick="LoadProducts('.$count.')"';
} ?> id="catdiv<?php echo $count; ?>">
<?php
if ($count == ($MAXCATEG - 2)) {
@ -1421,11 +1421,11 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
print '<div class="wrapper2 arrow" id="prodiv'.$count.'" ';
?>
<?php if ($count == ($MAXPRODUCT - 2)) {
?> onclick="MoreProducts('less');" <?php
?> onclick="MoreProducts('less')" <?php
} if ($count == ($MAXPRODUCT - 1)) {
?> onclick="MoreProducts('more');" <?php
?> onclick="MoreProducts('more')" <?php
} else {
echo 'onclick="ClickProduct('.$count.');"';
echo 'onclick="ClickProduct('.$count.')"';
} ?>>
<?php
if ($count == ($MAXPRODUCT - 2)) {

View File

@ -900,23 +900,23 @@ if (empty($reshook)) {
$sectionwithinvoicelink .= '</span><br>';
if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
} else {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposPrinting('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
}
} elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="DolibarrTakeposPrinting('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="DolibarrTakeposPrinting('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
} else {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="Print('.$placeid.');">'.$langs->trans('PrintTicket').'</button>';
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="Print('.$placeid.')">'.$langs->trans('PrintTicket').'</button>';
if (getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS')) {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="PrintBox('.$placeid.', \'without_details\');">'.$langs->trans('PrintWithoutDetails').'</button>';
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="PrintBox('.$placeid.', \'without_details\')">'.$langs->trans('PrintWithoutDetails').'</button>';
}
if (getDolGlobalString('TAKEPOS_GIFT_RECEIPT')) {
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="Print('.$placeid.', 1);">'.$langs->trans('GiftReceipt').'</button>';
$sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="Print('.$placeid.', 1)">'.$langs->trans('GiftReceipt').'</button>';
}
}
if (getDolGlobalString('TAKEPOS_EMAIL_TEMPLATE_INVOICE') && $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE > 0) {
$sectionwithinvoicelink .= ' <button id="buttonsend" type="button" onclick="SendTicket('.$placeid.');">'.$langs->trans('SendTicket').'</button>';
$sectionwithinvoicelink .= ' <button id="buttonsend" type="button" onclick="SendTicket('.$placeid.')">'.$langs->trans('SendTicket').'</button>';
}
if ($remaintopay <= 0 && getDolGlobalString('TAKEPOS_AUTO_PRINT_TICKETS') && $action != "history") {
@ -1294,7 +1294,7 @@ if (!empty($conf->use_javascript_ajax)) {
print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.(empty($mobilepage) ? '' : $mobilepage).' $_SESSION["basiclayout"]='.(empty($_SESSION["basiclayout"])?'':$_SESSION["basiclayout"]).' conf->global->TAKEPOS_BAR_RESTAURANT='.getDolGlobalString('TAKEPOS_BAR_RESTAURANT').' -->'."\n";
print '<div class="div-table-responsive-no-min invoice">';
print '<table id="tablelines" class="noborder noshadow postablelines" width="100%">';
print '<table id="tablelines" class="noborder noshadow postablelines centpercent">';
if ($sectionwithinvoicelink && ($mobilepage == "invoice" || $mobilepage == "")) {
if (!empty($conf->global->TAKEPOS_SHOW_HT)) {
print '<tr><td colspan="5">'.$sectionwithinvoicelink.'</td></tr>';

View File

@ -540,9 +540,9 @@ if (isModEnabled('stripe') && isset($keyforstripeterminalbank) && !empty($conf->
dol_htmloutput_mesg($langs->trans('ConnectingToStripeTerminal', 'Stripe'), '', 'warning', 1);
print '</span>';
}
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '7' : '10').');">'.($numpad == 0 ? '7' : '10').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '8' : '20').');">'.($numpad == 0 ? '8' : '20').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '9' : '50').');">'.($numpad == 0 ? '9' : '50').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '7' : '10').')">'.($numpad == 0 ? '7' : '10').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '8' : '20').')">'.($numpad == 0 ? '8' : '20').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '9' : '50').')">'.($numpad == 0 ? '9' : '50').'</button>';
?>
<?php if (count($arrayOfValidPaymentModes) > 0) {
$paycode = $arrayOfValidPaymentModes[0]->code;
@ -561,14 +561,14 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
}
}
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><span class="hideonsmartphone"><br>'.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'</span></button>';
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\')">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><span class="hideonsmartphone"><br>'.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[0]->code)).'</span></button>';
} else {
print '<button type="button" class="calcbutton2">'.$langs->trans("NoPaimementModesDefined").'</button>';
}
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '4' : '1').');">'.($numpad == 0 ? '4' : '1').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '5' : '2').');">'.($numpad == 0 ? '5' : '2').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '6' : '5').');">'.($numpad == 0 ? '6' : '5').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '4' : '1').')">'.($numpad == 0 ? '4' : '1').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '5' : '2').')">'.($numpad == 0 ? '5' : '2').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '6' : '5').')">'.($numpad == 0 ? '6' : '5').'</button>';
?>
<?php if (count($arrayOfValidPaymentModes) > 1) {
$paycode = $arrayOfValidPaymentModes[1]->code;
@ -587,15 +587,15 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
}
}
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br> '.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code)).'</button>';
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\')">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br> '.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[1]->code)).'</button>';
} else {
$button = array_pop($action_buttons);
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
}
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '1' : '0.10').');">'.($numpad == 0 ? '1' : '0.10').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '2' : '0.20').');">'.($numpad == 0 ? '2' : '0.20').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '3' : '0.50').');">'.($numpad == 0 ? '3' : '0.50').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '1' : '0.10').')">'.($numpad == 0 ? '1' : '0.10').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '2' : '0.20').')">'.($numpad == 0 ? '2' : '0.20').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '3' : '0.50').')">'.($numpad == 0 ? '3' : '0.50').'</button>';
?>
<?php if (count($arrayOfValidPaymentModes) > 2) {
$paycode = $arrayOfValidPaymentModes[2]->code;
@ -614,15 +614,15 @@ print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad
}
}
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br>'.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code)).'</button>';
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\')">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br>'.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[2]->code)).'</button>';
} else {
$button = array_pop($action_buttons);
print '<button type="button" class="calcbutton2" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
}
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '0' : '0.01').');">'.($numpad == 0 ? '0' : '0.01').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '\'000\'' : '0.02').');">'.($numpad == 0 ? '000' : '0.02').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '\'.\'' : '0.05').');">'.($numpad == 0 ? '.' : '0.05').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '0' : '0.01').')">'.($numpad == 0 ? '0' : '0.01').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '\'000\'' : '0.02').')">'.($numpad == 0 ? '000' : '0.02').'</button>';
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '\'.\'' : '0.05').')">'.($numpad == 0 ? '.' : '0.05').'</button>';
$i = 3;
while ($i < count($arrayOfValidPaymentModes)) {
@ -642,7 +642,7 @@ while ($i < count($arrayOfValidPaymentModes)) {
}
}
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\');">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br>'.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[$i]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[$i]->code)).'</button>';
print '<button type="button" class="calcbutton2" onclick="Validate(\''.dol_escape_js($paycode).'\')">'.(!empty($payIcon) ? '<span class="fa fa-2x fa-'.$payIcon.' iconwithlabel"></span><br>'.$langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[$i]->code) : $langs->trans("PaymentTypeShort".$arrayOfValidPaymentModes[$i]->code)).'</button>';
$i = $i + 1;
}
@ -676,8 +676,8 @@ foreach ($action_buttons as $button) {
print '<button type="button" class="'.$newclass.'" onclick="'.$button["function"].'"><span '.$button["span"].'>'.$button["text"].'</span></button>';
}
if ($conf->global->TAKEPOS_DELAYED_PAYMENT) {
print '<button type="button" class="calcbutton2" onclick="Validate(\'delayed\');">'.$langs->trans("Reported").'</button>';
if (getDolGlobalString('TAKEPOS_DELAYED_PAYMENT')) {
print '<button type="button" class="calcbutton2" onclick="Validate(\'delayed\')">'.$langs->trans("Reported").'</button>';
}
?>

View File

@ -91,7 +91,7 @@ if (empty($action)) {
if ($action == "productinfo") {
$prod = new Product($db);
$prod->fetch($idproduct);
print '<button type="button" class="publicphonebutton2 phoneblue total" onclick="AddProductConfirm(place, '.$idproduct.');">'.$langs->trans('Add').'</button>';
print '<button type="button" class="publicphonebutton2 phoneblue total" onclick="AddProductConfirm(place, '.$idproduct.')">'.$langs->trans('Add').'</button>';
print "<br><b>".$prod->label."</b><br>";
print '<img class="imgwrapper" width="60%" src="'.DOL_URL_ROOT.'/takepos/public/auto_order.php?genimg=pro&query=pro&id='.$idproduct.'">';
print "<br>".$prod->description;
@ -130,8 +130,8 @@ if ($action == "productinfo") {
$printer->printer->feed();
$printer->close();
} else {
print '<button type="button" class="publicphonebutton2 phoneblue total" onclick="CheckPlease(\'Cash\');">'.$langs->trans('Cash').'</button>';
print '<button type="button" class="publicphonebutton2 phoneblue total" onclick="CheckPlease(\'CreditCard\');">'.$langs->trans('CreditCard').'</button>';
print '<button type="button" class="publicphonebutton2 phoneblue total" onclick="CheckPlease(\'Cash\')">'.$langs->trans('Cash').'</button>';
print '<button type="button" class="publicphonebutton2 phoneblue total" onclick="CheckPlease(\'CreditCard\')">'.$langs->trans('CreditCard').'</button>';
print '<br>';
}
} elseif ($action == "editline") {
@ -148,9 +148,9 @@ if ($action == "productinfo") {
print "<br>".$prod->description;
print "<br><b>".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)."</b>";
print '<br>';
print '<button type="button" class="publicphonebutton2 phonered width24" onclick="SetQty(place, '.$selectedline.', '.($line->qty - 1).');">-</button>';
print '<button type="button" class="publicphonebutton2 phonegreen width24" onclick="SetQty(place, '.$selectedline.', '.($line->qty + 1).');">+</button>';
print '<button type="button" class="publicphonebutton2 phoneblue width24" onclick="SetNote(place, '.$selectedline.');">'.$langs->trans('Note').'</button>';
print '<button type="button" class="publicphonebutton2 phonered width24" onclick="SetQty(place, '.$selectedline.', '.($line->qty - 1).')">-</button>';
print '<button type="button" class="publicphonebutton2 phonegreen width24" onclick="SetQty(place, '.$selectedline.', '.($line->qty + 1).')">+</button>';
print '<button type="button" class="publicphonebutton2 phoneblue width24" onclick="SetNote(place, '.$selectedline.')">'.$langs->trans('Note').'</button>';
}
}
} else {

View File

@ -102,5 +102,7 @@ exclude:
- name: JSHint
- name: ReservedWordUsedAsNameJS
- name: JSUnusedLocalSymbols
- name: TrivialIfJS
- name: JSJQueryEfficiency
- name: JSDuplicatedDeclaration
- name: JSUnresolvedLibraryURL