From 4d9e64bfcfe9e3ee5346d8767da8ff0355c257b0 Mon Sep 17 00:00:00 2001 From: AurelienGoudeneche <44634756+AurelienGoudeneche@users.noreply.github.com> Date: Wed, 28 Nov 2018 13:04:59 +0100 Subject: [PATCH] Add files via upload --- htdocs/takepos/invoice.php | 2 ++ htdocs/takepos/pay.php | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index c71f7f861a3..7a3443cbee3 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -57,6 +57,7 @@ else{ if ($action == 'valid' && $user->rights->facture->creer){ if ($pay=="cash") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CASH; else if ($pay=="card") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CB; + else if ($pay=="cheque") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE; $now=dol_now(); $invoice = new Facture($db); $invoice->fetch($placeid); @@ -69,6 +70,7 @@ if ($action == 'valid' && $user->rights->facture->creer){ $payment->amounts[$invoice->id]=$invoice->total_ttc; if ($pay=="cash") $payment->paiementid=4; else if ($pay=="card") $payment->paiementid=6; + else if ($pay=="cheque") $payment->paiementid=7; $payment->num_paiement=$invoice->facnumber; $payment->create($user); $payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', ''); diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index 898b9069ba0..a31a72f2e56 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -41,7 +41,7 @@ $sql="SELECT rowid FROM ".MAIN_DB_PREFIX."facture where facnumber='(PROV-POS-".$ $resql = $db->query($sql); $row = $db->fetch_array ($resql); $placeid=$row[0]; -if (! $placeid) $placeid=0; // Invoice not exist +if (! $placeid) $placeid=0; // Developing error message with no lines else{ $invoice = new Facture($db); $invoice->fetch($placeid); @@ -101,20 +101,21 @@ $langs->loadLangs(array("main", "bills", "cashdesk")); - + - + - + - + + - \ No newline at end of file +