Skip to content

Commit

Permalink
No posibility to validate if invoice not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
andreubisquerra committed Nov 4, 2018
1 parent 90d3b80 commit 86b98db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions htdocs/takepos/pay.php
Expand Up @@ -41,7 +41,7 @@
$resql = $db->query($sql);
$row = $db->fetch_array ($resql);
$placeid=$row[0];
if (! $placeid) $placeid=0; // Developing error message with no lines
if (! $placeid) $placeid=0; // Invoice not exist
else{
$invoice = new Facture($db);
$invoice->fetch($placeid);
Expand Down Expand Up @@ -101,15 +101,15 @@ function Validate(payment){
<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" class="calcbutton2" onclick="Validate('cash');"><?php echo $langs->trans("Cash"); ?></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="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" class="calcbutton2" onclick="Validate('card');"><?php echo $langs->trans("PaymentTypeCB"); ?></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="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="printclick();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></button>
<button type="button" class="calcbutton2" onclick="parent.$.colorbox.close();"><span id="printtext"><?php echo $langs->trans("GoBack"); ?></span></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>
Expand Down

0 comments on commit 86b98db

Please sign in to comment.