Skip to content

Commit d480f0d

Browse files
committed
Fixes #749
Files changed in commit: PDFAck.php PDFQuotation.php
1 parent cd100a3 commit d480f0d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

PDFAck.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
ON salesorders.fromstkloc=locations.loccode
6666
INNER JOIN currencies
6767
ON debtorsmaster.currcode=currencies.currabrev
68-
AND salesorders.orderno='" . $_GET['AcknowledgementNo'] . "'";
69-
68+
WHERE salesorders.orderno='" . $_GET['AcknowledgementNo'] . "'";
7069
$Result = DB_query($SQL, $ErrMsg);
7170

7271
if (DB_num_rows($Result) == 0) {

PDFQuotation.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
salesorders.deladd5,
5353
salesorders.deladd6,
5454
debtorsmaster.name,
55+
debtorsmaster.debtorno,
5556
debtorsmaster.currcode,
5657
debtorsmaster.address1,
5758
debtorsmaster.address2,
@@ -174,11 +175,13 @@
174175
$SubTot = $MyRow2['unitprice']*$MyRow2['quantity']*(1-$MyRow2['discountpercent']);
175176
$TaxProv = $MyRow['taxprovinceid'];
176177
$TaxCat = $MyRow2['taxcatid'];
178+
$DebtorNo = $MyRow['debtorno'];
177179
$Branch = $MyRow['branchcode'];
178180
$SQL3 = "SELECT taxgrouptaxes.taxauthid
179181
FROM taxgrouptaxes INNER JOIN custbranch
180182
ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid
181-
WHERE custbranch.branchcode='" .$Branch ."'";
183+
WHERE custbranch.debtorno='" . $DebtorNo . "'
184+
AND custbranch.branchcode='" . $Branch . "'";
182185
$Result3=DB_query($SQL3, $ErrMsg);
183186
$TaxAuth = 0;
184187
while ($MyRow3=DB_fetch_array($Result3)){
@@ -267,4 +270,4 @@
267270
$DomPDF->render();
268271

269272
// Output the generated PDF to Browser
270-
$DomPDF->stream($PdfFileName, array("Attachment" => false));
273+
$DomPDF->stream($PdfFileName, array("Attachment" => false));

0 commit comments

Comments
 (0)