projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aa72369
)
Fixed Email Receipt to customer.
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 1 May 2019 08:00:31 +0000
(10:00 +0200)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Wed, 1 May 2019 08:00:31 +0000
(10:00 +0200)
reporting/includes/reporting.inc
patch
|
blob
|
history
reporting/rep112.php
patch
|
blob
|
history
reporting/reports_main.php
patch
|
blob
|
history
sales/customer_payments.php
patch
|
blob
|
history
diff --git
a/reporting/includes/reporting.inc
b/reporting/includes/reporting.inc
index 80632db211e2b2645413846bbad7ec37ef0d746d..6062ddca554ef024ca0ead27085e815041a3e31a 100644
(file)
--- a/
reporting/includes/reporting.inc
+++ b/
reporting/includes/reporting.inc
@@
-92,8
+92,9
@@
function print_document_link($doc_no, $link_text, $link=true, $type_no,
'PARAM_0' => $doc_no,
'PARAM_1' => $doc_no,
'PARAM_2' => '',
'PARAM_0' => $doc_no,
'PARAM_1' => $doc_no,
'PARAM_2' => '',
- 'PARAM_3' => '',
- 'PARAM_4' => $def_orientation);
+ 'PARAM_3' => $email,
+ 'PARAM_4' => '',
+ 'PARAM_5' => $def_orientation);
break;
case ST_SUPPAYMENT :
$rep = 210;
break;
case ST_SUPPAYMENT :
$rep = 210;
diff --git
a/reporting/rep112.php
b/reporting/rep112.php
index a70b78cb112b47d8fbf33a72b1a53a11fb62e72d..aaaf783cea0ff576ed75f33dbb021b8cf4c805c6 100644
(file)
--- a/
reporting/rep112.php
+++ b/
reporting/rep112.php
@@
-60,8
+60,9
@@
function print_receipts()
$from = $_POST['PARAM_0'];
$to = $_POST['PARAM_1'];
$currency = $_POST['PARAM_2'];
$from = $_POST['PARAM_0'];
$to = $_POST['PARAM_1'];
$currency = $_POST['PARAM_2'];
- $comments = $_POST['PARAM_3'];
- $orientation = $_POST['PARAM_4'];
+ $email = $_POST['PARAM_3'];
+ $comments = $_POST['PARAM_4'];
+ $orientation = $_POST['PARAM_5'];
if (!$from || !$to) return;
if (!$from || !$to) return;
@@
-82,12
+83,10
@@
function print_receipts()
$cur = get_company_Pref('curr_default');
$cur = get_company_Pref('curr_default');
- $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize(), 9, $orientation);
+ if ($email == 0)
+ $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize(), 9, $orientation);
if ($orientation == 'L')
recalculate_cols($cols);
if ($orientation == 'L')
recalculate_cols($cols);
- $rep->currency = $cur;
- $rep->Font();
- $rep->Info($params, $cols, null, $aligns);
for ($i = $from; $i <= $to; $i++)
{
for ($i = $from; $i <= $to; $i++)
{
@@
-107,6
+106,16
@@
function print_receipts()
$baccount = db_fetch($res);
$params['bankaccount'] = $baccount['bank_act'];
$baccount = db_fetch($res);
$params['bankaccount'] = $baccount['bank_act'];
+ if ($email == 1)
+ {
+ $rep = new FrontReport("", "", user_pagesize(), 9, $orientation);
+ $rep->title = _('RECEIPT');
+ $rep->filename = "Receipt" . $i . ".pdf";
+ }
+ $rep->currency = $cur;
+ $rep->Font();
+ $rep->Info($params, $cols, null, $aligns);
+
$contacts = get_branch_contacts($myrow['branch_code'], 'invoice', $myrow['debtor_no']);
$rep->SetCommonData($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT, $contacts);
$rep->SetHeaderType('Header2');
$contacts = get_branch_contacts($myrow['branch_code'], 'invoice', $myrow['debtor_no']);
$rep->SetCommonData($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT, $contacts);
$rep->SetHeaderType('Header2');
@@
-180,8
+189,13
@@
function print_receipts()
$rep->TextCol(4, 5, _("Branch"), - 2);
$rep->TextCol(5, 6, "__________________", - 2);
$rep->TextCol(6, 7, "__________________");
$rep->TextCol(4, 5, _("Branch"), - 2);
$rep->TextCol(5, 6, "__________________", - 2);
$rep->TextCol(6, 7, "__________________");
+ if ($email == 1)
+ {
+ $rep->End($email);
+ }
}
}
}
}
- $rep->End();
+ if ($email == 0)
+ $rep->End();
}
}
diff --git
a/reporting/reports_main.php
b/reporting/reports_main.php
index 85c2612f1c32063341e096edfd7b268d62462b6f..92bf3d921f2e6263526ddec0fafe6115f9751b8f 100644
(file)
--- a/
reporting/reports_main.php
+++ b/
reporting/reports_main.php
@@
-156,6
+156,7
@@
$reports->addReport(RC_CUSTOMER, 112, _('Print Receipts'),
array( _('From') => 'RECEIPT',
_('To') => 'RECEIPT',
_('Currency Filter') => 'CURRENCY',
array( _('From') => 'RECEIPT',
_('To') => 'RECEIPT',
_('Currency Filter') => 'CURRENCY',
+ _('Email Customers') => 'YES_NO',
_('Comments') => 'TEXTBOX',
_('Orientation') => 'ORIENTATION'));
_('Comments') => 'TEXTBOX',
_('Orientation') => 'ORIENTATION'));
diff --git
a/sales/customer_payments.php
b/sales/customer_payments.php
index f314b9889b250f05289022009bdeaa913de51644..907f789eca8499fd7dd1e9014fe0be406779c6b4 100644
(file)
--- a/
sales/customer_payments.php
+++ b/
sales/customer_payments.php
@@
-102,6
+102,7
@@
if (isset($_GET['AddedID'])) {
display_notification_centered(_("The customer payment has been successfully entered."));
submenu_print(_("&Print This Receipt"), ST_CUSTPAYMENT, $payment_no."-".ST_CUSTPAYMENT, 'prtopt');
display_notification_centered(_("The customer payment has been successfully entered."));
submenu_print(_("&Print This Receipt"), ST_CUSTPAYMENT, $payment_no."-".ST_CUSTPAYMENT, 'prtopt');
+ submenu_print(_("&Email This Receipt"), ST_CUSTPAYMENT, $payment_no."-".ST_CUSTPAYMENT, null, 1);
submenu_view(_("&View this Customer Payment"), ST_CUSTPAYMENT, $payment_no);
submenu_view(_("&View this Customer Payment"), ST_CUSTPAYMENT, $payment_no);