-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from maniamartial/develop-25
Update on pf sales invoice
- Loading branch information
Showing
4 changed files
with
302 additions
and
2 deletions.
There are no files selected for viewing
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
Empty file.
268 changes: 268 additions & 0 deletions
268
burundi_compliance/burundi_compliance/print_format/sales_invoice_pf/sales_invoice_pf.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,268 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0/css/bootstrap.min.css" integrity="sha384-rQ8YmFoi3aDl3FUaE9ZRqeOjFjR6JqA/Fh1Pf0InVfbZi5MMJ1thPSiUGT5YUxR" crossorigin="anonymous"> | ||
|
||
<style> | ||
/* US Letter PORTRAIT page size BEGINS */ | ||
@media all { | ||
.print-format { | ||
max-width: 21.6cm; | ||
width: 21.6cm; | ||
min-height: 27.9cm; | ||
height: 27.9cm; | ||
padding: 0.0cm; | ||
margin: 0.0cm 0.0cm 0.0cm 0.0cm; | ||
float: left; | ||
background-color: rgba(255,2555,255,1.0); | ||
box-shadow: 0px 0px 9px rgba(0,0,0,0.5); | ||
} | ||
.print-format.landscape { | ||
max-width: 27.9cm; | ||
width: 27.9cm; | ||
} | ||
.print-format.portrait { | ||
max-width: 21.6cm; | ||
width: 21.6cm; | ||
} | ||
} | ||
@page { | ||
size: 21.6cm 27.9cm portrait; | ||
} | ||
/* US Letter PORTRAIT page size ENDS */ | ||
|
||
body { | ||
font-family: Arial, sans-serif; | ||
|
||
} | ||
|
||
.invoice-container { | ||
max-width: 900px; | ||
padding: 2px; | ||
|
||
} | ||
|
||
.head-row { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
min-height: 300px; | ||
} | ||
|
||
.head-col { | ||
max-width: 400px; | ||
margin-bottom: 15px; | ||
|
||
} | ||
|
||
.letterhead { | ||
height: auto; | ||
max-height: 150px; | ||
max-width: 500px; | ||
} | ||
|
||
.qrcode { | ||
height: auto; | ||
max-height: auto; | ||
max-width: 300px; | ||
padding-top: 100px; | ||
} | ||
.qrcode-image { | ||
height: auto; | ||
|
||
word-wrap: break-word; | ||
|
||
|
||
padding-right: 20px; | ||
|
||
} | ||
|
||
|
||
h1, h4 { | ||
margin: 10px 0; | ||
} | ||
|
||
p { | ||
margin: 5px 0; | ||
} | ||
.t-table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
margin-left:-40px; | ||
margin-top: 50px; | ||
} | ||
|
||
.t-table td { | ||
|
||
text-align: left; | ||
font-size: 12px; | ||
} | ||
.td-line { | ||
border-bottom: #0f0f0f solid 1px; | ||
text-align: left; | ||
font-size: 12px; | ||
|
||
} | ||
.t-table hr { | ||
border: 0; | ||
border-top: 1px solid rgba(0, 0, 0, 0.1); | ||
} | ||
.thead-dark{ | ||
background-color: #C0C0C0; | ||
|
||
font-size: medium; | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-weight: bold; | ||
} | ||
.thead-dark th{ | ||
color: black; | ||
} | ||
|
||
.footer { | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
width: 100%; | ||
padding: 20px; | ||
box-sizing: border-box; | ||
} | ||
|
||
|
||
</style> | ||
<title>Sales Invoice</title> | ||
</head> | ||
<body> | ||
<div class="container invoice-container"> | ||
<!-- Letter Head and QR Code Row --> | ||
<div class="head-row"> | ||
<!-- Letter Head --> | ||
<div class="head-col"> | ||
{%- set letter_head = frappe.get_doc("Letter Head", "Default") %} | ||
{%- if letter_head and letter_head.content %} | ||
<div class="letterhead"> | ||
{{ letter_head.content | safe }} | ||
</div> | ||
{%- endif %} | ||
|
||
|
||
|
||
</div> | ||
|
||
|
||
<!-- QR Code Image --> | ||
<div class="head-col"> | ||
<div class="qrcode"> | ||
<!--============================================== QR Code Image ============================================================================--> | ||
<!-- {%- set electronic_signature = doc.custom_invoice_identifier %} | ||
{%- if electronic_signature %} | ||
{%- set qr_code_string = get_qr_code(electronic_signature) %} | ||
<img src="{{ qr_code_string }}" class="qrcode-image"> | ||
{%- else %} | ||
<p>No electronic signature available.</p> | ||
{%- endif %} --> | ||
<!--===============================================End of QR code =============================================================================--> | ||
|
||
|
||
<div class="mt-2" style="margin-top: 0px;"> | ||
<h3>FACTURE</h3> | ||
<h4>{{ doc.name }}</h4> | ||
</div> | ||
<!-- <p class="mb-1">Facture OBR n°: {{ doc.custom_invoice_registered_no }}</p> --> | ||
<div class="qrcode-image overflow-auto"><p>{{doc.custom_invoice_identifier}}</p></div> | ||
|
||
</div> | ||
|
||
|
||
</div> | ||
</div> | ||
|
||
<hr class="mt-2"> | ||
|
||
<!-- Customer Details --> | ||
<div class="row" style="display:flex"> | ||
<div class="col-md-6"> | ||
<h4> Le client</h4> | ||
|
||
<p><strong>Nom et prénom ou Raison sociale:</strong> {{ doc.customer_name }}</p> | ||
<p><strong>NIF :</strong> {{ doc.tax_id }}</p> | ||
<p><strong>Résident à :</strong> {{ doc.customer_address }}</p> | ||
<p><strong>Assujetti à la TVA:</strong> | ||
{% if doc.exempt_from_sales_tax == 1 %} | ||
NON | ||
{% else %} | ||
OUI | ||
{% endif %} | ||
</p> | ||
</div> | ||
<div class="col-md-6" style="margin-left: 150px;"> | ||
<p><b>Posting Date:</b> {{ doc.posting_date }}</p> | ||
<p><b>Payment Due Date:</b> {{ doc.due_date }}</p> | ||
</div> | ||
</div> | ||
|
||
<!-- Items Table --> | ||
<div class="row t-table"> | ||
<div class="col mr-5 ml-5"> | ||
<table class="table table-bordered"> | ||
<thead class="thead-dark"> | ||
<tr> | ||
<th>Nature de l’article ou service</th> | ||
<th>QUANTITE</th> | ||
<th>PU</th> | ||
<th>PVHTVA</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for item in doc.items %} | ||
<tr> | ||
<td>{{ item.item_name }}</td> | ||
<td>{{ item.qty }}</td> | ||
<td>{{ '{:,.0f}'.format(item.rate) }}</td> | ||
<td>{{ '{:,.0f}'.format(item.amount) }}</td> | ||
</tr> | ||
{% endfor %} | ||
|
||
<!-- Additional Rows for PVT HTVA, TVA, and Total TVAC --> | ||
<tr> | ||
<td colspan="3" class="text-right"> TOTAL HTVA:</td> | ||
<td>Fr. <b>{{ '{:,.0f}'.format(doc.base_total | round) }}</b></td> | ||
</tr> | ||
{% if doc.exempt_from_sales_tax == 0 %} | ||
<tr> | ||
<td colspan="3" class="text-right">TVA:</td> | ||
<td>Fr. <strong>{{ '{:,.0f}'.format(doc.base_total_taxes_and_charges | round) }}</strong></td> | ||
</tr> | ||
{% endif %} | ||
<tr> | ||
<td colspan="3" class="text-right"><strong>Total TVAC:</strong></td> | ||
<td>Fr. <strong>{{ '{:,.0f}'.format(doc.base_grand_total | round) }}</strong></td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
</div> | ||
|
||
</div> | ||
<div> | ||
<td colspan="4">In Words: {{ doc.base_in_words }}</td> | ||
</div> | ||
|
||
<div class="footer" style="padding-left:20px; padding-top:20px"> | ||
{%- set letter_head = frappe.get_doc("Letter Head", "Default") %} | ||
{%- if letter_head and letter_head.footer %} | ||
<div class="letterh"> | ||
{{ letter_head.footer | safe }} | ||
</div> | ||
{%- endif %} | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</body> | ||
</html> | ||
|
32 changes: 32 additions & 0 deletions
32
burundi_compliance/burundi_compliance/print_format/sales_invoice_pf/sales_invoice_pf.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"absolute_value": 0, | ||
"align_labels_right": 0, | ||
"creation": "2024-04-12 14:42:50.576732", | ||
"custom_format": 1, | ||
"default_print_language": "en", | ||
"disabled": 0, | ||
"doc_type": "Sales Invoice", | ||
"docstatus": 0, | ||
"doctype": "Print Format", | ||
"font_size": 14, | ||
"html": "{%include 'burundi_compliance/burundi_compliance/print_format/sales_iinvoice_pf/sales_invoice_pf.html'%}", | ||
"idx": 0, | ||
"line_breaks": 0, | ||
"margin_bottom": 15.0, | ||
"margin_left": 15.0, | ||
"margin_right": 15.0, | ||
"margin_top": 15.0, | ||
"modified": "2024-04-12 14:45:00.515260", | ||
"modified_by": "Administrator", | ||
"module": "Burundi Compliance", | ||
"name": "Sales Invoice PF", | ||
"owner": "Administrator", | ||
"page_number": "Hide", | ||
"print_designer": 0, | ||
"print_format_builder": 0, | ||
"print_format_builder_beta": 0, | ||
"print_format_type": "Jinja", | ||
"raw_printing": 0, | ||
"show_section_headings": 0, | ||
"standard": "Yes" | ||
} |