Merge pull request #10087 from AurelGDN/develop
New Takepos: cheque payment button in cashdesk
This commit is contained in:
commit
03f0922325
@ -47,6 +47,21 @@ button.calcbutton2 {
|
|||||||
height:24%;
|
height:24%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.calcbutton3 {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
|
line-height: normal;
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
font-size:120%;
|
||||||
|
overflow: visible; /* removes extra width in IE */
|
||||||
|
width:12%;
|
||||||
|
height:24%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
button.actionbutton {
|
button.actionbutton {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@ -57,6 +57,7 @@ else{
|
|||||||
if ($action == 'valid' && $user->rights->facture->creer){
|
if ($action == 'valid' && $user->rights->facture->creer){
|
||||||
if ($pay=="cash") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CASH;
|
if ($pay=="cash") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CASH;
|
||||||
else if ($pay=="card") $bankaccount=$conf->global->CASHDESK_ID_BANKACCOUNT_CB;
|
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();
|
$now=dol_now();
|
||||||
$invoice = new Facture($db);
|
$invoice = new Facture($db);
|
||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
@ -69,6 +70,7 @@ if ($action == 'valid' && $user->rights->facture->creer){
|
|||||||
$payment->amounts[$invoice->id]=$invoice->total_ttc;
|
$payment->amounts[$invoice->id]=$invoice->total_ttc;
|
||||||
if ($pay=="cash") $payment->paiementid=4;
|
if ($pay=="cash") $payment->paiementid=4;
|
||||||
else if ($pay=="card") $payment->paiementid=6;
|
else if ($pay=="card") $payment->paiementid=6;
|
||||||
|
else if ($pay=="cheque") $payment->paiementid=7;
|
||||||
$payment->num_paiement=$invoice->facnumber;
|
$payment->num_paiement=$invoice->facnumber;
|
||||||
$payment->create($user);
|
$payment->create($user);
|
||||||
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
$payment->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $bankaccount, '', '');
|
||||||
|
|||||||
@ -101,19 +101,20 @@ $langs->loadLangs(array("main", "bills", "cashdesk"));
|
|||||||
<button type="button" class="calcbutton" onclick="addreceived(10);">10</button>
|
<button type="button" class="calcbutton" onclick="addreceived(10);">10</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(20);">20</button>
|
<button type="button" class="calcbutton" onclick="addreceived(20);">20</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(50);">50</button>
|
<button type="button" class="calcbutton" onclick="addreceived(50);">50</button>
|
||||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
<button type="button" class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(1);">1</button>
|
<button type="button" class="calcbutton" onclick="addreceived(1);">1</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(2);">2</button>
|
<button type="button" class="calcbutton" onclick="addreceived(2);">2</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(5);">5</button>
|
<button type="button" class="calcbutton" onclick="addreceived(5);">5</button>
|
||||||
<button type="button" <?php if ($placeid==0) echo "disabled";?> class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
<button type="button" class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(0.10);">0.10</button>
|
<button type="button" class="calcbutton" onclick="addreceived(0.10);">0.10</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(0.20);">0.20</button>
|
<button type="button" class="calcbutton" onclick="addreceived(0.20);">0.20</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(0.50);">0.50</button>
|
<button type="button" class="calcbutton" onclick="addreceived(0.50);">0.50</button>
|
||||||
<button type="button" class="calcbutton2" onclick="parent.$.colorbox.close();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
<button type="button" class="calcbutton2" onclick="Validate('cheque');"><?php echo $langs->trans("Cheque"); ?></button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(0.01);">0.01</button>
|
<button type="button" class="calcbutton" onclick="addreceived(0.01);">0.01</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(0.02);">0.02</button>
|
<button type="button" class="calcbutton" onclick="addreceived(0.02);">0.02</button>
|
||||||
<button type="button" class="calcbutton" onclick="addreceived(0.05);">0.05</button>
|
<button type="button" class="calcbutton" onclick="addreceived(0.05);">0.05</button>
|
||||||
<button type="button" class="calcbutton2" onclick="reset();"><span style='font-size: 150%;'>C</span></button>
|
<button type="button" class="calcbutton3" onclick="reset();"><span style='font-size: 150%;'>C</span></button>
|
||||||
|
<button type="button" class="calcbutton3" onclick="printclick();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user