! -> Note
$ -> Affected files
+06-Sep-2007 Joe Hunt
+ + Added optional link for electronic payment on invoices (PayPal)
+ $ /reporting/reports_main.php
+ /reporting/rep107.php
+ /reporting/includes/report_classes.inc
+ /reporting/includes/pdf_report.inc
+ /reporting/includes/doc_text.inc
+ /reporting/includes/doc_text2.inc
+
23-Aug-2007 Joe Hunt
# Unnecessary parameter ($db) in check_for_recursive_bom
$ /manufacturing/manage/bom_edit.php
$doc_Phone_Fax_Email = _("Phone/Fax/Email");
$doc_Bank = _("Bank");
$doc_Bank_Account = _("Bank Account");
+ $doc_Payment_Link = _("You can pay through");
if ($doctype == 8 || $doctype == 9 || $doctype == 10 || $doctype == 11)
{
if ($doctype == 8)
$doc_Dear_Sirs = _("Dear Sirs");
$doc_AttachedFile = _("Attached you will find ");
$doc_Kindest_regards = _("Kindest regards");
+ $doc_Payment_Link = _("You can pay through");
}
if (isset($header2type) || isset($linetype))
{
$doc_Phone_Fax_Email = "Phone/Fax/Email";
$doc_Bank = "Bank";
$doc_Bank_Account = "Bank Account";
+ $doc_Payment_Link = "You can pay through";
if ($doctype == 8 || $doctype == 9 || $doctype == 10 || $doctype == 11)
{
if ($doctype == 8)
$doc_Dear_Sirs = "Dear Sirs";
$doc_AttachedFile = "Attached you will find ";
$doc_Kindest_regards = "Kindest regards";
+ $doc_Payment_Link = "You can pay through";
}
if (isset($header2type) || isset($linetype))
{
if ($this->company['coy_logo'] != '')
{
$logo = $path_to_root . "themes/default/images/" . $this->company['coy_logo'];
- $this->AddImage($logo, $ccol, $iline1 + 5, 220, 40);
+ $this->AddImage($logo, $ccol, $iline1 + 5, 250, 40);
}
else
{
$temp = $this->row - 2 * $this->lineHeight;
$this->row = $iline5 - $this->lineHeight - 6;
$this->Text($ccol, $doc_Please_Quote . " - " . $myrow['curr_code']);
+ if ($branch['disable_branch'] > 0) // payment links
+ {
+ if ($branch['disable_branch'] == 1)
+ {
+ $this->NewLine();
+ $amt = number_format($myrow["ov_freight"] + $myrow["ov_gst"] + $myrow["ov_amount"], user_price_dec());
+ $txt = $doc_Payment_Link . " PayPal: ";
+ $url = "https://www.paypal.com/xclick/business=" . $this->company['email'] . "&item_name=" .
+ $this->title . "+" . $myrow['reference'] . "&amount=" . $amt . "¤cy_code=" . $myrow['curr_code'];
+ $this->fontSize -= 2;
+ $this->Text($ccol, $txt.$url);
+ $this->addLink($url, $ccol, $this->row, $this->pageWidth - $this->rightMargin, $this->row - $this->lineHeight);
+ $this->fontSize += 2;
+ }
+ }
if ($this->params['comments'] != '')
{
$this->NewLine(2);
$from = $this->company['coy_name'] . " <" . $this->company['email'] . ">";
$to = $myrow['DebtorName'] . " <" . $myrow['email'] . ">";
$msg = $doc_Dear_Sirs . ",\n\n" . $doc_AttachedFile . " " . $subject .
- "\n\n" . $doc_Kindest_regards . "\n\n";
+ "\n\n";
+ if ($myrow['dimension_id'] > 0) // helper for payment links
+ {
+ if ($myrow['dimension_id'] == 1)
+ {
+ $amt = number_format($myrow["ov_freight"] + $myrow["ov_gst"] + $myrow["ov_amount"], user_price_dec());
+ $txt = $doc_Payment_Link . " PayPal: ";
+ $url = "https://www.paypal.com/xclick/business=" . $this->company['email'] . "&item_name=" .
+ $this->title . "+" . $myrow['reference'] . "&amount=" . $amt . "¤cy_code=" . $myrow['curr_code'];
+ $msg .= $txt . $url . "\n\n";
+ }
+ }
+ $msg .= $doc_Kindest_regards . "\n\n";
$sender = $this->user . "\n" . $this->company['coy_name'];
$mail->to($to);
$mail->subject($subject);
$sel = array(_('No'), _("Yes"));
$st .= dup_simple_name_list("RP_" . $this->id . "_$index", $sel);
break;
+ case 'PAYMENT_LINK':
+ $sel = array(_("No Payment Link"), "PayPal");
+ $st .= dup_simple_name_list("RP_" . $this->id . "_$index", $sel);
+ break;
case 'COMPARE':
$sel = array(_("Accumulated"), _("Period Y-1"), _("Budget"));
$st .= dup_simple_name_list("RP_" . $this->id . "_$index", $sel);
$currency = $_POST['PARAM_2'];
$bankaccount = $_POST['PARAM_3'];
$email = $_POST['PARAM_4'];
- $comments = $_POST['PARAM_5'];
+ $paylink = $_POST['PARAM_5'];
+ $comments = $_POST['PARAM_6'];
if ($from == null)
$from = 0;
continue;
$myrow = get_customer_trans($i, $j);
$branch = get_branch($myrow["branch_code"]);
+ $branch['disable_branch'] = $paylink; // helper
if ($j == 10)
$sales_order = get_sales_order($myrow["order_"]);
else
$rep->Font();
if ($email == 1)
{
+ $myrow['dimension_id'] = $paylink; // helper for pmt link
if ($myrow['email'] == '')
{
$myrow['email'] = $branch['email'];
new ReportParam(_('Currency Filter'),'CURRENCY'),
new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'),
new ReportParam(_('email Customers'),'YES_NO'),
+ new ReportParam(_('Payment Link'),'PAYMENT_LINK'),
new ReportParam(_('Comments'),'TEXTBOX')));
$reports->addReport(_('Customer'),108,_('Print Statements'),
array( new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'),