Skip to content

Commit

Permalink
Merge pull request #51 from maniamartial/develop-25
Browse files Browse the repository at this point in the history
Update on pf sales invoice
  • Loading branch information
maniamartial authored Apr 12, 2024
2 parents 9a7e17d + 27490ba commit b7000cb
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
{{ letter_head.content | safe }}
</div>
{%- endif %}
<div class="head_adon" style="margin-top:35px">
<div class="head_adon" style="margin-top:70px">
{% set ebms_settings = frappe.get_doc("eBMS Settings", doc.company) %}
{% if ebms_settings %}
<div><strong>Nom du contribuable:</strong> {{doc.company}}</div>
Expand Down Expand Up @@ -263,7 +263,7 @@ <h4> Le client</h4>
<tr>
<th>Nature de l’article ou
service</th>
<th>Qté</th>
<th>QUANTITE</th>
<th>PU</th>
<th>PVHTVA</th>
</tr>
Expand Down
Empty file.
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>

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"
}

0 comments on commit b7000cb

Please sign in to comment.