25-Jan-2010 Joe Hunt
# Bug in the sequence in sales price pickup
$ /sales/includes/sales_db.inc
-
+ Added document Receipt and small rearrangements and bugfixes
$ /includes/types.inc
/includes/ui/ui_view.inc
}
$doc_Our_VAT_no = _("Our VAT No.");
$doc_Domicile = _("Domicile");
+ $doc_Extra = "";
if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
$doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) {
if ($doctype == ST_CUSTPAYMENT)
$doc_Extra = _("* Subject to Realisation of the Cheque.");
- else
- $doc_Extra = "";
$doc_Bank_Account = '';
$doc_Please_Quote = _("All amounts stated in");
} else {
$doc_Customers_Ref = "Customers Reference";
$doc_Our_Order_No = "Our Order No";
}
+ $doc_Extra = "";
$doc_Our_VAT_no = "Our VAT No.";
$doc_Domicile = "Domicile";
if($doctype == ST_CUSTDELIVERY || $doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER ||
$doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) {
if ($doctype == ST_CUSTPAYMENT)
$doc_Extra = "* Subject to Realisation of the Cheque.";
- else
- $doc_Extra = "";
$doc_Bank_Account = '';
$doc_Please_Quote = "All amounts stated in";
} else {
$this->row = $temp;
if ($doctype == ST_PURCHORDER)
$this->Text($mcol, $this->company['coy_name']);
- elseif ($doctype != ST_SUPPAYMENT)
+ elseif ($doctype != ST_SUPPAYMENT && isset($sales_order['deliver_to']))
$this->Text($mcol, $sales_order['deliver_to']);
$this->NewLine();
- if ($doctype != ST_SUPPAYMENT)
+ if ($doctype != ST_SUPPAYMENT && isset($sales_order['deliver_to']))
$this->TextWrapLines($mcol, $this->rightMargin - $mcol, $sales_order['delivery_address']);
}
$this->row = $iline2 - $this->lineHeight - 1;
$this->TextWrap($col, $this->row, $width, $myrow['wo_ref'], 'C');
elseif (isset($sales_order["customer_ref"]))
$this->TextWrap($col, $this->row, $width, $sales_order["customer_ref"], 'C');
- else
+ elseif (isset($myrow["debtor_ref"]))
$this->TextWrap($col, $this->row, $width, $myrow["debtor_ref"], 'C');
$col += $width;
if ($branch != null)
else
$rep->TextCol(3, 6, $doc_TOTAL_ORDER2, - 2);
$rep->TextCol(6, 7, $DisplayTotal, -2);
- $words = price_in_words($myrow['Total'], ST_SALESORDER);
+ $words = price_in_words($myrow["freight_cost"] + $SubTotal, ST_SALESORDER);
if ($words != "")
{
$rep->NewLine(1);
else
$rep->TextCol(3, 6, $doc_TOTAL_ORDER2, - 2);
$rep->TextCol(6, 7, $DisplayTotal, -2);
- $words = price_in_words($myrow['Total'], ST_SALESQUOTE);
+ $words = price_in_words($myrow["freight_cost"] + $SubTotal, ST_SALESQUOTE);
if ($words != "")
{
$rep->NewLine(1);
$cur = get_company_Pref('curr_default');
- if ($email == 0)
- {
- $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize());
- $rep->currency = $cur;
- $rep->Font();
- $rep->Info($params, $cols, null, $aligns);
- }
+ $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize());
+ $rep->currency = $cur;
+ $rep->Font();
+ $rep->Info($params, $cols, null, $aligns);
for ($i = $fno[0]; $i <= $tno[0]; $i++)
{
$rep->TextCol(6, 7, "__________________");
}
}
- if ($email == 0)
- $rep->End();
+ $rep->End();
}
?>
\ No newline at end of file
$rep->Font('bold');
$rep->TextCol(3, 6, $doc_TOTAL_PO, - 2);
$rep->TextCol(6, 7, $DisplayTotal, -2);
- $words = price_in_words($myrow['Total'], ST_PURCHORDER);
+ $words = price_in_words($SubTotal, ST_PURCHORDER);
if ($words != "")
{
$rep->NewLine(1);