-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secondary Print Format #209
Conversation
@agritheory can you help me to sort-out this pre-commit problem |
@viralkansodiya This looks good, but I think we need to include a sample secondary print format. I think we can extract the existing sample format but just this section: <table class="table table-responsive-sm">
<tr><td colspan="2">{{doc.party_name}}</td>
<td> {{ frappe.utils.formatdate(doc.reference_date) or '' }} </td>
<td style="text-align:right;" colspan="2"> {{doc.get_formatted("base_paid_amount")}} </td>
<tr>
<th> Date </th>
<th style="text-align:left;"> Reference </th>
<th style="text-align:center;"> Amount </th>
<th style="text-align:right;"> Payment </th>
</tr>
{% for reference in doc.references %}
<tr>
{% if reference.reference_doctype == 'Purchase Invoice' %}
<td>{{ frappe.utils.formatdate(frappe.db.get_value(reference.reference_doctype, reference.reference_name, "bill_date")) or ""}}</td>
<td style="text-align:left;"> {{ frappe.db.get_value(reference.reference_doctype, reference.reference_name, "bill_no") or "" }}</td>
{% elif reference.reference_doctype == 'Sales Invoice' %}
<td style="text-align:left;">{{ frappe.utils.formatdate(frappe.db.get_value(reference.reference_doctype, reference.reference_name, "po_date")) or ""}}</td>
<td style="text-align:left;"> {{ frappe.db.get_value(reference.reference_doctype, reference.reference_name, "po_no") or "" }}</td>
{% elif reference.reference_doctype == 'Expense Claim' %}
<td style="text-align:left;">{{ frappe.utils.formatdate(frappe.db.get_value(reference.reference_doctype, reference.reference_name, "expense_report_date")) or " "}}</td>
<td style="text-align:left;"> {{ frappe.db.get_value(reference.reference_doctype, reference.reference_name, "name") or " " }}</td>
{% elif reference.reference_doctype == 'Journal Entry' %}
<td style="text-align:left;"> {{ frappe.utils.formatdate(frappe.db.get_value(reference.reference_doctype, reference.reference_name, "posting_date")) or " "}}</td>
<td style="text-align:left;"> {{ frappe.db.get_value(reference.reference_doctype, reference.reference_name, "name") or " " }}</td>
{% endif %}
<td style="text-align:center;"> {{ frappe.utils.fmt_money(reference.get_formatted('total_amount'), 2, 'USD')}}</td>
<td style="text-align:right;"> {{ reference.get_formatted('allocated_amount')}}</td>
</tr>
{% endfor %}
</table> |
"Do you mean that in the new print format (secondary print), I should place this code as mentioned above? Or should I duplicate the existing format (example) as the secondary print and remove this code as mentioned above?" |
@agritheory |
@agritheory Missing fields in print format |
@viralkansodiya Please review the attach PDF. Both voucher sections should use the (new) comma separated approach, which looks great. Just copy paste that please. I don't see the secondary voucher format being generated along with this PDF (attached). Please rebase this branch to pick up the latest changes on branch version-14. |
please review this attachment I have added secondary print format |
Code Changes in this PR
|
The latest on this combines the two formats into a single PDF, we want two PDFs, one with each format, both attached to the Check Run. The formats themselves look good, though I'm not sure if there's an extra page per-check here. That would throw off the check numbering on pre-numbered checks. |
@agritheory |
@agritheory Name of check format, which is a cheque format (Secondary Print Format) |
@agritheory
New field in Check Run Settings : Secondary Print Format
if Secondary Print Format is selected : payment entry will not be split by Number of Invoices per voucher. If in setting Split Invoices by Address is enable then payment entry will split by address