Merge pull request #24665 from hregis/fix_takepos_php8
FIX avoid warnings php8
This commit is contained in:
commit
a4bbbd485d
@ -295,7 +295,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($terminalid != '') {
|
if (isset($terminalid) && $terminalid != '') {
|
||||||
// Calculate $initialbalanceforterminal for terminal 0
|
// Calculate $initialbalanceforterminal for terminal 0
|
||||||
foreach ($arrayofpaymentmode as $key => $val) {
|
foreach ($arrayofpaymentmode as $key => $val) {
|
||||||
if ($key != 'cash') {
|
if ($key != 'cash') {
|
||||||
@ -305,7 +305,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
|
|||||||
|
|
||||||
// Get the bank account dedicated to this point of sale module/terminal
|
// Get the bank account dedicated to this point of sale module/terminal
|
||||||
$vartouse = 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse;
|
$vartouse = 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse;
|
||||||
$bankid = $conf->global->$vartouse;
|
$bankid = getDolGlobalInt($vartouse);
|
||||||
|
|
||||||
if ($bankid > 0) {
|
if ($bankid > 0) {
|
||||||
$sql = "SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX."bank";
|
$sql = "SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX."bank";
|
||||||
|
|||||||
@ -1185,6 +1185,7 @@ if ($resql) {
|
|||||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
// Show the new button only when this page is not opend from the Extended POS
|
// Show the new button only when this page is not opend from the Extended POS
|
||||||
|
$newcardbutton = '';
|
||||||
if ($contextpage != 'poslist') {
|
if ($contextpage != 'poslist') {
|
||||||
$url = DOL_URL_ROOT.'/compta/facture/card.php?action=create';
|
$url = DOL_URL_ROOT.'/compta/facture/card.php?action=create';
|
||||||
if (!empty($socid)) {
|
if (!empty($socid)) {
|
||||||
@ -2548,7 +2549,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use correct digits number for totals
|
// Use correct digits number for totals
|
||||||
$totalarray['val']['total_margin'] = price2num($totalarray['val']['total_margin'], 'MT');
|
$totalarray['val']['total_margin'] = (isset($totalarray['val']['total_margin']) ? price2num($totalarray['val']['total_margin'], 'MT') : null);
|
||||||
|
|
||||||
// Show total line
|
// Show total line
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||||
|
|||||||
@ -84,7 +84,7 @@ $vatRateDefault = get_default_tva($mysoc, $soc);
|
|||||||
$arrayofcss = array('/takepos/css/pos.css.php');
|
$arrayofcss = array('/takepos/css/pos.css.php');
|
||||||
$arrayofjs = array();
|
$arrayofjs = array();
|
||||||
|
|
||||||
top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss);
|
top_htmlhead('', '', 0, 0, $arrayofjs, $arrayofcss);
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|||||||
@ -936,7 +936,7 @@ $( document ).ready(function() {
|
|||||||
if ($resql) {
|
if ($resql) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
// If there is no cash control from today open it
|
// If there is no cash control from today open it
|
||||||
if ($obj->rowid == null) {
|
if (!isset($obj->rowid) || is_null($obj->rowid)) {
|
||||||
print "ControlCashOpening();";
|
print "ControlCashOpening();";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,7 +125,7 @@ if ($action=="split") {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$invoice = new Facture($db);
|
$invoice = new Facture($db);
|
||||||
if ($invoiceid > 0) {
|
if (isset($invoiceid) && $invoiceid > 0) {
|
||||||
$invoice->fetch($invoiceid);
|
$invoice->fetch($invoiceid);
|
||||||
} else {
|
} else {
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
|
||||||
@ -134,7 +134,7 @@ if ($invoiceid > 0) {
|
|||||||
if ($obj) {
|
if ($obj) {
|
||||||
$invoiceid = $obj->rowid;
|
$invoiceid = $obj->rowid;
|
||||||
}
|
}
|
||||||
if (!$invoiceid) {
|
if (!isset($invoiceid)) {
|
||||||
$invoiceid = 0; // Invoice does not exist yet
|
$invoiceid = 0; // Invoice does not exist yet
|
||||||
} else {
|
} else {
|
||||||
$invoice->fetch($invoiceid);
|
$invoice->fetch($invoiceid);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user