Add files via upload
This commit is contained in:
parent
d59c81cfe4
commit
4d9e64bfcf
@ -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, '', '');
|
||||
|
||||
@ -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"));
|
||||
<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(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(2);">2</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.20);">0.20</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.02);">0.02</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>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user