-
-
Save lxthien/fdd5feba04b3bba4ef9a to your computer and use it in GitHub Desktop.
From sales invoices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Sample Print Format for ERPNext | |
Please use at your own discretion | |
For suggestions and contributions: | |
https://github.com/webnotes/erpnext-print-templates | |
Freely usable under MIT license | |
--> | |
<!-- Style Settings --> | |
<style> | |
/* | |
common style for whole page | |
This should include: | |
+ page size related settings | |
+ font family settings | |
+ line spacing settings | |
*/ | |
@media screen { | |
body { | |
width: 8.3in; | |
} | |
} | |
html, body, div, span, td { | |
font-family: "Georgia", serif; | |
font-size: 12px; | |
} | |
body { | |
padding: 10px; | |
margin: auto; | |
font-size: 12px; | |
line-height: 150%; | |
} | |
.common { | |
font-family: "Georgia", serif !important; | |
font-size: 12px; | |
padding: 10px 0px; | |
} | |
table { | |
border-collapse: collapse; | |
width: 100%; | |
vertical-align: top; | |
} | |
table td { | |
padding: 2px 0px; | |
} | |
table h1, h2, h3, h4, h5, h6 { | |
padding: 0px; | |
margin: 0px; | |
} | |
table.header-table td { | |
vertical-align: top; | |
} | |
table.header-table thead { | |
border-bottom: 1px solid black; | |
} | |
table.header-table h3 { | |
color: gray; | |
} | |
table.header-table thead td { | |
padding: 5px 0px; | |
} | |
div.page-body table td:nth-child(6), | |
div.page-body table td:nth-child(7) { | |
text-align: right; | |
} | |
table.footer-table td { | |
vertical-align: top; | |
} | |
table.footer-table td table td:nth-child(2), | |
table.footer-table td table td:nth-child(3) { | |
text-align: right; | |
} | |
.developper-01{ | |
width: 8.3in; | |
} | |
.developper-border-01{ | |
font-weight: normal; | |
} | |
.developper-border-02{font-weight: 600; margin-left: 10px;} | |
.headder-developper-01 table{ | |
width: 8.3in; | |
} | |
.td-header-1{ | |
width: 5.3in; | |
} | |
.td-header-2{ | |
width: 3.0in; | |
} | |
</style> | |
<style> | |
.title-sales-voice-1{font-weight: 600; font-size: 20px; text-transform: uppercase;} | |
.title-sales-voice-2{font-size: 16px; text-transform: uppercase;} | |
.row{width: 100%; display: block;} | |
.row-header-01{display: inline-block; width: 45%; float: left;} | |
.row-header-02{display: inline-block; width: 50%; float: left; font-weight: bolder;} | |
.letter-head{width: 100%; margin-bottom: 40px;} | |
.letter-head table{width: 100%;} | |
.letter-head .letter-head-left{width: 70%;} | |
.letter-head .letter-head-left span{font-weight: 600;} | |
.letter-head .letter-head-right{width: 30%;} | |
.signature{width: 100%;} | |
.signature table{width: 100%;} | |
.signature table tr.tr-signature-01{height: 80px;} | |
.signature table tr.tr-signature-01 td{vertical-align: top;} | |
.signature table tr td{text-align: center; width: 50%;} | |
.signature-title{font-weight: bold;} | |
.signature-01{font-style: italic;} | |
.headder-developper-01{height: 120px;} | |
</style> | |
<!--column add by Thien STS--> | |
<!-- Javascript --> | |
<script> | |
si_std = { | |
print_item_table: function() { | |
var table = print_table( | |
'Sales Invoice', | |
doc.name, | |
'entries', | |
'Sales Invoice Item', | |
[// Here specify the table columns to be displayed | |
'SR', 'description', 'qty', 'stock_uom', | |
'export_rate', 'export_amount' | |
], | |
[// Here specify the labels of column headings | |
'Stt<br>(No)', 'Tên Hàng Hóa, Dịch Vụ<br>(Description)', 'SL<br>(Qty)', | |
'Dvt<br>(UoM)', 'Basic Rate', 'Thành tiền<br>(Amount)' | |
], | |
[// Here specify the column widths | |
'5%', '35%', '10%', | |
'10%', '20%', '20%' | |
], | |
null, | |
null, | |
{ | |
'description' : function(data_row) { | |
if(data_row.adj_rate) { | |
var to_append = '<div style="padding-left: 15px;"><i>Discount: ' + | |
data_row.adj_rate + '% on ' + doc.currency + ' ' + | |
fmt_money(data_row.ref_rate) + '</i></div>'; | |
if(data_row.description.indexOf(to_append)==-1) { | |
return data_row.description + to_append; | |
} else { return data_row.description; } | |
} else { | |
return data_row.description; | |
} | |
} | |
} | |
); | |
// This code takes care of page breaks | |
if(table.appendChild) { | |
out = table.innerHTML; | |
} else { | |
out = ''; | |
for(var i=0; i < (table.length-1); i++) { | |
out += table[i].innerHTML + | |
'<div style = "page-break-after: always;" \ | |
class = "page_break"></div>\ | |
<div class="page-settings"></div>'; | |
} | |
out += table[table.length-1].innerHTML; | |
} | |
return out; | |
}, | |
print_other_charges: function(parent) { | |
var oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges'); | |
var rows = '<table width=100%>\n'; | |
for(var i=0; i<oc.length; i++) { | |
if(!oc[i].included_in_print_rate) { | |
rows += | |
'<tr>\n' + | |
'\t<td>' + oc[i].description + '</td>\n' + | |
'\t<td></td>\n' + | |
'\t<td width=38%>' + fmt_money(oc[i].tax_amount/doc.conversion_rate) + '</td>\n' + | |
'</tr>\n'; | |
} | |
} | |
return rows + '</table>\n'; | |
} | |
}; | |
</script> | |
<!-- | |
<div class="letter-head"> | |
<table> | |
<tr> | |
<td class="letter-head-left"> | |
<span>CÔNG TY TNHH HAMONA VIỆT NAM - HAMONA VIET NAM CO., lTD</span><br /> | |
R606, B block, Indochina Plaza, #4 Nguyen Dinh Chieu street, DaKao Ward,<br /> | |
Dsitrict 1, Ho Chi Minh City, Vietnam<br /> | |
Tel: +84 8 6278 4380 - Fax: +84 8 6262 4677<br /> | |
Tax code: 0312 316 584 | |
</td> | |
<td class="letter-head-right"> | |
Logo | |
</td> | |
</tr> | |
</table> | |
</div> | |
--> | |
<div class="headder-developper-01"> | |
<table> | |
<tr> | |
<td rowspan="4"><span class="title-sales-voice-1">Hóa đơn giá trị tăng</span> - <span class="title-sales-voice-2">(Vat Invoice)</span></td> | |
<td><span class="row-header-01">Mẫu số (Form):</span> <span class="row-header-02">SFER33FF</span></td> | |
</tr> | |
<tr> | |
<td><span class="row-header-01">Kí hiệu (Serial):</span> <span class="row-header-02">HN/13T</span></td> | |
</tr> | |
<tr> | |
<td><span class="row-header-01">Liên 1 (Copy 1):</span> <span class="row-header-02">Lưu (for save)</span></td> | |
</tr> | |
<tr> | |
<td><span class="row-header-01">Số (No.):</span> <span class="row-header-02"><script>cur_frm.docname</script></span></td> | |
</tr> | |
<tr> | |
<td colspan="2">Ngày (date) <script>date.str_to_user(doc.posting_date).substr(0, 2)</script> Tháng (month) <script>date.str_to_user(doc.posting_date).substr(3, 2)</script> Năm (year) <script>date.str_to_user(doc.posting_date).substr(6, 4)</script></td> | |
</tr> | |
</table> | |
</div> | |
<div class='common page-header'> | |
<table class='header-table developper-01' cellspacing=0> | |
<tbody> | |
<tr> | |
<td><span class="developper-border-01">Họ và tên người mua (Buyer's name):</span> <span class="developper-border-02"><script>doc.customer_name</script></span></td> | |
</tr> | |
<tr> | |
<td><span class="developper-border-01">Đơn vị (Company's name):</span> <span class="developper-border-02"><script>doc.company</script></span></td> | |
</tr> | |
<tr> | |
<td><span class="developper-border-01">Mã số thuế (Tax code):</span> <span class="developper-border-02"><script>doc.customer_tax_code</script></span></td> | |
</tr> | |
<tr> | |
<td><span class="developper-border-01">Địa chỉ (Address):</span> <span class="developper-border-02"><script>doc.address_display.replace(/\n|\r/g, " ")</script></span></td> | |
</tr> | |
<tr> | |
<td><span class="developper-border-01">Số tài khoản (Account No.):</span> <span class="developper-border-02"><script>doc.account_no</script></span></td> | |
</tr> | |
<tr> | |
<td><span class="developper-border-01">Hình thức thanh toán (Method of payment):</span> <span class="developper-border-02"><script>doc.mode_of_payment</script></span></td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
<!--column add by Thien STS--> | |
<!-- Page Layout Settings --> | |
<div class='common page-header'> | |
<!-- | |
Page Header will contain | |
+ table 1 | |
+ table 1a | |
- Name | |
- Address | |
- Contact | |
- Mobile No | |
+ table 1b | |
- Voucher Date | |
- Due Date | |
--> | |
</div> | |
<div class='common page-body'> | |
<script>si_std.print_item_table()</script> | |
</div> | |
<div class='common page-footer'> | |
<!-- | |
Page Footer will contain | |
+ table 3 | |
- Terms and Conditions | |
- Total Rounded Amount Calculation | |
- Total Rounded Amount in Words | |
--> | |
<table class='footer-table' width=100% cellspacing=0> | |
<thead></thead> | |
<tbody> | |
<tr> | |
<td width=60% style='padding-right: 10px;'> | |
<!-- | |
<b>Terms, Conditions & Other Information:</b><br /> | |
<script>doc.terms</script> | |
--> | |
</td> | |
<td> | |
<table cellspacing=0 width=100%><tbody> | |
<tr> | |
<td>CỘNG TIỀN HÀNG (SUB TOTAL)</td> | |
<td></td> | |
<td width=38%><script> | |
fmt_money(doc.net_total_export) | |
</script></td> | |
</tr> | |
<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr> | |
<tr> | |
<td>Grand Total</td> | |
<td></td> | |
<td><script> | |
fmt_money(doc.grand_total_export) | |
</script></td> | |
</tr> | |
<tr style='font-weight: bold'> | |
<td>Rounded Total</td> | |
<td><script>doc.currency</script></td> | |
<td><script> | |
fmt_money(doc.rounded_total_export) | |
</script></td> | |
</tr> | |
</tbody> | |
</table> | |
<!--<br /><b>In Words</b><br />--> | |
</td> | |
</tr> | |
<tr> | |
<td colspan=2> | |
Số tiền viết bằng chữ (Amount in word): <i><script>doc.in_words_export</script></i><!--..........................................................................................................................................--> | |
</td> | |
</tr> | |
</tbody> | |
<tfoot></tfoot> | |
</table> | |
</div> | |
<div class="signature"> | |
<table> | |
<tr class="tr-signature-01"> | |
<td>NGƯỜI MUA HÀNG<br>(BUYER)</td> | |
<td>NGƯỜI BÁN HÀNG<br>(SELLER)</td> | |
</tr> | |
<tr class="tr-signature-01"> | |
<td>Ký và ghi rõ họ tên<br>(Sign, with fullname)</td> | |
<td>Ký, đóng dấu và ghi rõ họ tên<br>(Sign & stamp, with fullname)</td> | |
</tr> | |
<tr> | |
<td colspan=2><em>(cần kiểm tra, đối chiếu khi lập, giao, nhận hóa đơn)</em></td> | |
</tr> | |
<tr> | |
<td colspan=2> | |
<span class="signature-title">Web Notes Techonlogies Pvt. Ldt.</span><br> | |
<span class="signature-01">PAN Number: </span><span>AAACW8099E</span><br> | |
<span class="signature-01">Service Tax No: </span><span>AAACW8099EST001</span> | |
</td> | |
</tr> | |
</table> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment