This commit is contained in:
Marwan Alwali 2024-12-23 17:41:24 +03:00
parent d57702ea7a
commit 92e94e7265
4 changed files with 455 additions and 742 deletions

View File

@ -1,3 +1,4 @@
from nltk.app.wordnet_app import page_from_reference
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer
from reportlab.lib import colors from reportlab.lib import colors
from reportlab.lib.pagesizes import A4 from reportlab.lib.pagesizes import A4
@ -62,7 +63,7 @@ def generate_quotation_pdf(response, quotation, services):
# Car Details Table # Car Details Table
elements.append(Paragraph("Car Details", heading_style)) elements.append(Paragraph("Car Details", heading_style))
car_data = [["VIN", "Model", "Year", "Quantity", "Price", "VAT %", "Total"]] car_data = [["رقم الهيكل", "الموديل", "سنة الصنع", "الكمية", "السعر", "الضريبة", "الإجمالي"]]
for item in quotation.quotation_cars.all(): for item in quotation.quotation_cars.all():
car_data.append([ car_data.append([
item.car.vin, item.car.vin,
@ -117,5 +118,6 @@ def generate_quotation_pdf(response, quotation, services):
])) ]))
elements.append(additional_table) elements.append(additional_table)
# Build PDF # Build PDF
doc.build(elements) doc.build(elements)

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -62,7 +62,7 @@
<th>{% trans "Year" %}</th> <th>{% trans "Year" %}</th>
<th>{% trans "Quantity" %}</th> <th>{% trans "Quantity" %}</th>
<th>{% trans "Price" %}</th> <th>{% trans "Price" %}</th>
<th>{% trans "VAT %" %}</th> <th>{% trans "VAT" %}</th>
<th>{% trans "Total" %}</th> <th>{% trans "Total" %}</th>
</tr> </tr>
</thead> </thead>