Skip to content

Commit

Permalink
Merge pull request #205 from efeone/purchase_printformat
Browse files Browse the repository at this point in the history
feat:created print format for purchase
  • Loading branch information
muhammadmp authored Feb 3, 2024
2 parents d211f73 + d0db81c commit d17e3d5
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aumms/aumms/doctype/design_details/design_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"is_customer_provided",
"dr_required",
"attach"
"is_customer_provided",
"dr_required",
"attach"
],
"fields": [
{
Expand Down Expand Up @@ -53,7 +56,7 @@
{
"default": "0",
"fieldname": "is_customer_provided",
"fieldtype": "Check",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Is Customer Provided"
},
Expand Down
Empty file.
Empty file.
31 changes: 31 additions & 0 deletions aumms/aumms/print_format/purchase/purchase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"absolute_value": 0,
"align_labels_right": 0,
"creation": "2023-08-30 10:17:03.495047",
"custom_format": 1,
"default_print_language": "en",
"disabled": 0,
"doc_type": "Jewellery Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font_size": 14,
"html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <style>\n table {\n border-collapse: collapse;\n }\n th, td {\n border: 1px solid black;\n padding: 8px;\n }\n .tall {\n height: 100px;\n }\n .wide {\n width: 150px;\n }\n .right-align {\n margin-right: 20px;\n }\n </style>\n</head>\n<body>\n <table style=\"width:100%; font-size: 12px;\">\n <thead>\n <tr>\n <td colspan=\"8\"><div style=\"text-align: center;\"><b><u>Sales Estimate</u></b></div></td>\n </tr>\n </thead>\n <tbody>\n \n <tr>\n <td colspan=\"3\"><b>{{ _(\"Customer Name\") }}:</b> {{ doc.customer_name }} </td>\n <!--<td><b>Board Rate @916</b></td>-->\n <!--<td><b>{{ doc.old_jewellery_items[0].board_rate }}</b></td>-->\n <td rowspan=\"2\" colspan=\"6\"><div style=\"text-align: right;\"><b>{{ _(\"Date\") }}:</b> {{ doc.get_formatted(\"transaction_date\") }}</div></td>\n </tr>\n <!--<tr>-->\n <!-- <td colspan=\"3\"><b>{{ _(\"Customer Name\") }}:</b> {{ doc.customer_name }}<br><b>NAME</b><br><b>C/O RFQ</b><br>98</td>-->\n <!--</tr>-->\n </tbody>\n </table>\n <!--<div class=\"right-align\">-->\n <table style=\"width:100%; font-size: 12px;\">\n <tr>\n <td colspan=\"8\"><b>Old Gold Received</b></td>\n </tr>\n <tr>\n <td colspan=\"\"><b>ITEM</b></td>\n <td><b>Purity</b></td>\n <td><b>Gr. Wt</b></td>\n <td><b>Stone Wt.</b></td>\n <td><b>Net Weight</b></td>\n <td><b>Rate</b></td>\n <td><b>Amount</b></td>\n </tr>\n {%- for item in doc.old_jewellery_items -%}\n <tr>\n <td class=\"wide\">Old Gold Received</td>\n <td>{{ item.purity }}</td>\n <td>0.000</td>\n <td>0.000</td>\n <td>0.000</td>\n <td>{{ item.rate }}</td>\n <td>{{ item.amount }}</td>\n </tr>\n {%- endfor -%}\n </table>\n <!--</div>-->\n <div class=\"left-align\">\n <table style=\"width:100%; font-size: 12px;\">\n <tr>\n <td colspan=\"3\">Old received</td>\n <td>{{ doc.total_old_gold_weight }}</td>\n </tr>\n <tr>\n <td colspan=\"3\"><b>Balance Receivable</b></td>\n <td><b>{{ doc.total_old_gold_amount }}</b></td>\n </tr>\n <tr>\n <td colspan=\"8\" class=\"tall\" style=\"border-top: none;\"><div style=\"text-align: right;\">Authorised Signatory</div></td>\n </tr>\n </table>\n </div>\n</body>\n</html>\n",
"idx": 0,
"line_breaks": 0,
"margin_bottom": 15.0,
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
"modified": "2024-02-03 11:46:50.984947",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "Purchase",
"owner": "Administrator",
"page_number": "Hide",
"print_format_builder": 0,
"print_format_builder_beta": 0,
"print_format_type": "Jinja",
"raw_printing": 0,
"show_section_headings": 0,
"standard": "Yes"
}
Empty file.
31 changes: 31 additions & 0 deletions aumms/aumms/print_format/test/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"absolute_value": 0,
"align_labels_right": 0,
"creation": "2024-02-03 11:45:47.227360",
"custom_format": 1,
"default_print_language": "en",
"disabled": 0,
"doc_type": "Jewellery Invoice",
"docstatus": 0,
"doctype": "Print Format",
"font_size": 14,
"html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <style>\n table {\n border-collapse: collapse;\n }\n th, td {\n border: 1px solid black;\n padding: 8px;\n }\n .tall {\n height: 100px;\n }\n .wide {\n width: 150px;\n }\n .right-align {\n margin-right: 20px;\n }\n </style>\n</head>\n<body>\n <table style=\"width:100%; font-size: 12px;\">\n <thead>\n <tr>\n <td colspan=\"8\"><div style=\"text-align: center;\"><b><u>Sales Estimate</u></b></div></td>\n </tr>\n </thead>\n <tbody>\n \n <tr>\n <td colspan=\"3\"><b>{{ _(\"Customer Name\") }}:</b> {{ doc.customer_name }} </td>\n <!--<td><b>Board Rate @916</b></td>-->\n <!--<td><b>{{ doc.old_jewellery_items[0].board_rate }}</b></td>-->\n <td rowspan=\"2\" colspan=\"6\"><div style=\"text-align: right;\"><b>{{ _(\"Date\") }}:</b> {{ doc.get_formatted(\"transaction_date\") }}</div></td>\n </tr>\n <!--<tr>-->\n <!-- <td colspan=\"3\"><b>{{ _(\"Customer Name\") }}:</b> {{ doc.customer_name }}<br><b>NAME</b><br><b>C/O RFQ</b><br>98</td>-->\n <!--</tr>-->\n </tbody>\n </table>\n <!--<div class=\"right-align\">-->\n <table style=\"width:100%; font-size: 12px;\">\n <tr>\n <td colspan=\"8\"><b>Old Gold Received</b></td>\n </tr>\n <tr>\n <td colspan=\"\"><b>ITEM</b></td>\n <td><b>Purity</b></td>\n <td><b>Gr. Wt</b></td>\n <td><b>Stone Wt.</b></td>\n <td><b>Net Weight</b></td>\n <td><b>Rate</b></td>\n <td><b>Amount</b></td>\n </tr>\n {%- for item in doc.old_jewellery_items -%}\n <tr>\n <td class=\"wide\">Old Gold Received</td>\n <td>{{ item.purity }}</td>\n <td>0.000</td>\n <td>0.000</td>\n <td>0.000</td>\n <td>{{ item.rate }}</td>\n <td>{{ item.amount }}</td>\n </tr>\n {%- endfor -%}\n </table>\n <!--</div>-->\n <div class=\"left-align\">\n <table style=\"width:100%; font-size: 12px;\">\n <tr>\n <td colspan=\"3\">Old received</td>\n <td>{{ doc.total_old_gold_weight }}</td>\n </tr>\n <tr>\n <td colspan=\"3\"><b>Balance Receivable</b></td>\n <td><b>{{ doc.total_old_gold_amount }}</b></td>\n </tr>\n <tr>\n <td colspan=\"8\" class=\"tall\" style=\"border-top: none;\"><div style=\"text-align: right;\">Authorised Signatory</div></td>\n </tr>\n </table>\n </div>\n</body>\n</html>\n",
"idx": 0,
"line_breaks": 0,
"margin_bottom": 15.0,
"margin_left": 15.0,
"margin_right": 15.0,
"margin_top": 15.0,
"modified": "2024-02-03 11:45:47.227360",
"modified_by": "Administrator",
"module": "AuMMS",
"name": "test",
"owner": "Administrator",
"page_number": "Hide",
"print_format_builder": 0,
"print_format_builder_beta": 0,
"print_format_type": "Jinja",
"raw_printing": 0,
"show_section_headings": 0,
"standard": "Yes"
}

0 comments on commit d17e3d5

Please sign in to comment.