| Line 676... |
Line 676... |
| 676 |
catalog_client = InventoryClient().get_client()
|
676 |
catalog_client = InventoryClient().get_client()
|
| 677 |
warehouse = catalog_client.getWarehouse(order.warehouse_id)
|
677 |
warehouse = catalog_client.getWarehouse(order.warehouse_id)
|
| 678 |
|
678 |
|
| 679 |
logistics_client = LogisticsClient().get_client()
|
679 |
logistics_client = LogisticsClient().get_client()
|
| 680 |
provider = logistics_client.getProvider(order.logistics_provider_id)
|
680 |
provider = logistics_client.getProvider(order.logistics_provider_id)
|
| 681 |
to_addr = provider.email
|
681 |
to_addr = provider.details[DeliveryType.PREPAID].email
|
| 682 |
raw_message = '''
|
682 |
raw_message = '''
|
| 683 |
Dear Sir/Madam,
|
683 |
Dear Sir/Madam,
|
| 684 |
|
684 |
|
| 685 |
Kindly arrange a pickup today from %(customer_city)s. Pickup and delivery addresses are mentioned below.
|
685 |
Kindly arrange a pickup today from %(customer_city)s. Pickup and delivery addresses are mentioned below.
|
| 686 |
|
686 |
|
| Line 700... |
Line 700... |
| 700 |
|
700 |
|
| 701 |
Thanks and Regards
|
701 |
Thanks and Regards
|
| 702 |
Anand Sinha
|
702 |
Anand Sinha
|
| 703 |
'''
|
703 |
'''
|
| 704 |
message = dedent(raw_message) % { 'customer_city' : order.customer_city,
|
704 |
message = dedent(raw_message) % { 'customer_city' : order.customer_city,
|
| 705 |
'provider_code' : provider.accountNo,
|
705 |
'provider_code' : provider.details[DeliveryType.PREPAID].accountNo,
|
| 706 |
'order_weight' : str(order.total_weight),
|
706 |
'order_weight' : str(order.total_weight),
|
| 707 |
'customer_address' : __get_order_address(order),
|
707 |
'customer_address' : __get_order_address(order),
|
| 708 |
'warehouse_executive' : 'Parmod Kumar',
|
708 |
'warehouse_executive' : 'Parmod Kumar',
|
| 709 |
'warehouse_address' : warehouse.location,
|
709 |
'warehouse_address' : warehouse.location,
|
| 710 |
'warehouse_pin' : warehouse.pincode,
|
710 |
'warehouse_pin' : warehouse.pincode,
|
| Line 1017... |
Line 1017... |
| 1017 |
address_text.textLine("Phone: 9971573026")
|
1017 |
address_text.textLine("Phone: 9971573026")
|
| 1018 |
pdf.drawText(address_text)
|
1018 |
pdf.drawText(address_text)
|
| 1019 |
|
1019 |
|
| 1020 |
pdf.setFont('Times-Roman',12)
|
1020 |
pdf.setFont('Times-Roman',12)
|
| 1021 |
order_text = pdf.beginText(inch, PAGE_HEIGHT - 4 * inch)
|
1021 |
order_text = pdf.beginText(inch, PAGE_HEIGHT - 4 * inch)
|
| 1022 |
order_text.textLine("Pickup CODE: " + provider.accountNo)
|
1022 |
order_text.textLine("Pickup CODE: " + provider.details[DeliveryType.PREPAID].accountNo)
|
| 1023 |
lineitem = order.lineitems[0]
|
1023 |
lineitem = order.lineitems[0]
|
| 1024 |
order_text.textLine("Content : " + lineitem.brand + " " + lineitem.model_number + " " + lineitem.color)
|
1024 |
order_text.textLine("Content : " + lineitem.brand + " " + lineitem.model_number + " " + lineitem.color)
|
| 1025 |
order_text.textLine("Declared Value: Rs. " + str(order.total_amount))
|
1025 |
order_text.textLine("Declared Value: Rs. " + str(order.total_amount))
|
| 1026 |
order_text.textLine("Order ID : " + str(order.id))
|
1026 |
order_text.textLine("Order ID : " + str(order.id))
|
| 1027 |
pdf.drawText(order_text)
|
1027 |
pdf.drawText(order_text)
|