X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep111.php;h=02285fca2452857bf62adac6119761a67dfd3a39;hb=955e7d5427906ef544912411d1466fe5561d7f16;hp=c5bed8d12f51c738ef94014ad6163f50557b4b9d;hpb=e6cf9a74a7852b3ae2e4ebb794a755b6a90ad486;p=fa-stable.git diff --git a/reporting/rep111.php b/reporting/rep111.php index c5bed8d1..02285fca 100644 --- a/reporting/rep111.php +++ b/reporting/rep111.php @@ -30,7 +30,7 @@ print_sales_quotations(); function print_sales_quotations() { - global $path_to_root, $print_as_quote; + global $path_to_root, $print_as_quote, $print_invoice_no; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -76,12 +76,16 @@ function print_sales_quotations() $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); - $rep->filename = "SalesQuotation" . $i . ".pdf"; + if ($print_invoice_no == 1) + $rep->filename = "SalesQuotation" . $i . ".pdf"; + else + $rep->filename = "SalesQuotation" . $myrow['reference'] . ".pdf"; $rep->Info($params, $cols, null, $aligns); } $rep->title = _("SALES QUOTATION"); - $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE); - $rep->headerFunc = 'Header2'; + $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']); + $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts); + //$rep->headerFunc = 'Header2'; $rep->NewPage(); $result = get_sales_order_details($i, ST_SALESQUOTE); @@ -148,15 +152,9 @@ function print_sales_quotations() $rep->Font(); if ($email == 1) { - if ($myrow['contact_email'] == '') - { - $myrow['contact_email'] = $branch['email']; - if ($myrow['contact_email'] == '') - $myrow['contact_email'] = $myrow['master_email']; - $myrow['DebtorName'] = $branch['br_name']; - } - //$myrow['reference'] = $i; - $rep->End($email, $doc_Invoice_no . " " . $i, $myrow); + if ($print_invoice_no == 1) + $myrow['reference'] = $i; + $rep->End($email, $doc_Invoice_no . " " . $myrow['reference'], $myrow); } } if ($email == 0)