| Line 1841... |
Line 1841... |
| 1841 |
def add_billing_details(orderId, invoice_number, serialNumbers, itemNumbers, freebieWarehouseId, billedBy, jacketNumber, billingType, fulfilmentWarehouseId, authorize):
|
1841 |
def add_billing_details(orderId, invoice_number, serialNumbers, itemNumbers, freebieWarehouseId, billedBy, jacketNumber, billingType, fulfilmentWarehouseId, authorize):
|
| 1842 |
if billedBy is None or billedBy.strip() == "":
|
1842 |
if billedBy is None or billedBy.strip() == "":
|
| 1843 |
raise TransactionServiceException(110, "Invalid Biller")
|
1843 |
raise TransactionServiceException(110, "Invalid Biller")
|
| 1844 |
|
1844 |
|
| 1845 |
order = Order.get_by(id=orderId)
|
1845 |
order = Order.get_by(id=orderId)
|
| 1846 |
hsnCode = order.getLineItems.get(0).hsnCode
|
1846 |
hsnCode = order.lineItems[0].hsnCode
|
| 1847 |
if not order:
|
1847 |
if not order:
|
| 1848 |
raise TransactionServiceException(101, "No order found for the given order id" + str(orderId))
|
1848 |
raise TransactionServiceException(101, "No order found for the given order id" + str(orderId))
|
| 1849 |
|
1849 |
|
| 1850 |
newTaxType = __getOrderTaxType(order)
|
1850 |
newTaxType = __getOrderTaxType(order)
|
| 1851 |
order.taxType = newTaxType
|
1851 |
order.taxType = newTaxType
|
| Line 8496... |
Line 8496... |
| 8496 |
raise TransactionServiceException(301, "No order found for the given order id" + str(orderId))
|
8496 |
raise TransactionServiceException(301, "No order found for the given order id" + str(orderId))
|
| 8497 |
else:
|
8497 |
else:
|
| 8498 |
ordersList.append(order)
|
8498 |
ordersList.append(order)
|
| 8499 |
|
8499 |
|
| 8500 |
singleOrder = ordersList[0]
|
8500 |
singleOrder = ordersList[0]
|
| 8501 |
hsnCode = singleOrder.getLineItems.get(0).hsnCode
|
8501 |
hsnCode = singleOrder.lineItems[0].hsnCode
|
| 8502 |
if singleOrder.logisticsTransactionId is not None:
|
8502 |
if singleOrder.logisticsTransactionId is not None:
|
| 8503 |
grouppedOrders = get_group_orders_by_logistics_txn_id(singleOrder.logisticsTransactionId)
|
8503 |
grouppedOrders = get_group_orders_by_logistics_txn_id(singleOrder.logisticsTransactionId)
|
| 8504 |
|
8504 |
|
| 8505 |
errorString = ""
|
8505 |
errorString = ""
|
| 8506 |
missingString = "Billing Details Missing for following Orders:- "
|
8506 |
missingString = "Billing Details Missing for following Orders:- "
|