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:
5bcea56
)
Multiple email accounts on contacts didn't work in sales documents
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 26 Dec 2011 09:16:11 +0000
(10:16 +0100)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Mon, 26 Dec 2011 09:16:11 +0000
(10:16 +0100)
reporting/includes/pdf_report.inc
patch
|
blob
|
history
reporting/rep107.php
patch
|
blob
|
history
reporting/rep109.php
patch
|
blob
|
history
reporting/rep110.php
patch
|
blob
|
history
reporting/rep111.php
patch
|
blob
|
history
reporting/rep113.php
patch
|
blob
|
history
diff --git
a/reporting/includes/pdf_report.inc
b/reporting/includes/pdf_report.inc
index e4b4c3a66c58d398e630aeec436fb847ff90c37b..ee79d43e2e4173304deb5f008c6e0774dbef46ec 100644
(file)
--- a/
reporting/includes/pdf_report.inc
+++ b/
reporting/includes/pdf_report.inc
@@
-980,6
+980,7
@@
class FrontReport extends Cpdf
display_error(_("You have no email contact defined for this type of document"));
} else {
$sent = $try = 0;
display_error(_("You have no email contact defined for this type of document"));
} else {
$sent = $try = 0;
+ $emails = "";
if(!$subject)
$subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
foreach($this->contactData as $contact) {
if(!$subject)
$subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
foreach($this->contactData as $contact) {
@@
-1018,6
+1019,7
@@
class FrontReport extends Cpdf
$mail->subject($subject);
$mail->text($msg . $sender);
$mail->attachment($fname);
$mail->subject($subject);
$mail->text($msg . $sender);
$mail->attachment($fname);
+ $emails .= " " . $contact['email'];
if ($mail->send()) $sent++;
} // foreach contact
unlink($fname);
if ($mail->send()) $sent++;
} // foreach contact
unlink($fname);
@@
-1026,10
+1028,10
@@
class FrontReport extends Cpdf
display_error(_("There is no contact email set for this document type."));
} elseif (!$sent)
display_error($this->title . " " . $this->formData['document_number'] . ". "
display_error(_("There is no contact email set for this document type."));
} elseif (!$sent)
display_error($this->title . " " . $this->formData['document_number'] . ". "
- . _("Sending document by email failed") . ". " . _("Email:") .
" " . $contact['email']
);
+ . _("Sending document by email failed") . ". " . _("Email:") .
$emails
);
else
display_notification($this->title . " " . $this->formData['document_number'] . " "
else
display_notification($this->title . " " . $this->formData['document_number'] . " "
- . _("has been sent by email to destination.") . " " . _("Email:") .
" " . $contact['email']
);
+ . _("has been sent by email to destination.") . " " . _("Email:") .
$emails
);
}
}
else
}
}
else
diff --git
a/reporting/rep107.php
b/reporting/rep107.php
index 17fbd69dd3640d7b734c39eae78562786915d9bc..62dc0f2cb202a31c3afe0d53dd01b842f8e53a7e 100644
(file)
--- a/
reporting/rep107.php
+++ b/
reporting/rep107.php
@@
-92,7
+92,7
@@
function print_invoices()
}
else
$rep->title = _('INVOICE');
}
else
$rep->title = _('INVOICE');
- $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']);
+ $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']
, false
);
$baccount['payment_service'] = $pay_service;
$rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_SALESINVOICE, $contacts);
$rep->NewPage();
$baccount['payment_service'] = $pay_service;
$rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_SALESINVOICE, $contacts);
$rep->NewPage();
diff --git
a/reporting/rep109.php
b/reporting/rep109.php
index 181a0344ecbf582bb5a55d531e989fe1fa7e74f5..51697c3c6c1ec8bac98ae1c1b3d530d378b90093 100644
(file)
--- a/
reporting/rep109.php
+++ b/
reporting/rep109.php
@@
-98,7
+98,7
@@
function print_sales_orders()
else
$rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER"));
else
$rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER"));
- $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']);
+ $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']
, false
);
$rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts);
$rep->NewPage();
$rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts);
$rep->NewPage();
diff --git
a/reporting/rep110.php
b/reporting/rep110.php
index bcb89665d280686ee01253197e153d27887844ea..4b4fec83e614ede4775a1124481c70d91dbac82d 100644
(file)
--- a/
reporting/rep110.php
+++ b/
reporting/rep110.php
@@
-101,7
+101,7
@@
function print_deliveries()
}
else
$rep->title = _('DELIVERY NOTE');
}
else
$rep->title = _('DELIVERY NOTE');
- $contacts = get_branch_contacts($branch['branch_code'], 'delivery', $branch['debtor_no']);
+ $contacts = get_branch_contacts($branch['branch_code'], 'delivery', $branch['debtor_no']
, false
);
$rep->SetCommonData($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY, $contacts);
$rep->NewPage();
$rep->SetCommonData($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY, $contacts);
$rep->NewPage();
diff --git
a/reporting/rep111.php
b/reporting/rep111.php
index 80b6b712515792cf04e80283bcbfa6f33bc79553..07fbd41f2b34d62b223e946e4178fabd6e6c5e54 100644
(file)
--- a/
reporting/rep111.php
+++ b/
reporting/rep111.php
@@
-84,7
+84,7
@@
function print_sales_quotations()
$rep->Info($params, $cols, null, $aligns);
}
$rep->title = _("SALES QUOTATION");
$rep->Info($params, $cols, null, $aligns);
}
$rep->title = _("SALES QUOTATION");
- $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']);
+ $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']
, false
);
$rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts);
//$rep->headerFunc = 'Header2';
$rep->NewPage();
$rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts);
//$rep->headerFunc = 'Header2';
$rep->NewPage();
diff --git
a/reporting/rep113.php
b/reporting/rep113.php
index 7a612243ff6a2b313f6b92b17e6b94e4a18e0ad9..aec634e25f3da7d65e1b562d3766d7451011240a 100644
(file)
--- a/
reporting/rep113.php
+++ b/
reporting/rep113.php
@@
-94,7
+94,7
@@
function print_credits()
}
else
$rep->title = _('CREDIT NOTE');
}
else
$rep->title = _('CREDIT NOTE');
- $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']);
+ $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']
, false
);
$rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_CUSTCREDIT, $contacts);
$rep->NewPage();
$rep->SetCommonData($myrow, $branch, $sales_order, $baccount, ST_CUSTCREDIT, $contacts);
$rep->NewPage();