| Line 69... |
Line 69... |
| 69 |
InventoryServiceException, WarehouseType, InventoryType
|
69 |
InventoryServiceException, WarehouseType, InventoryType
|
| 70 |
from shop2020.thriftpy.model.v1.order.ttypes import TransactionServiceException, \
|
70 |
from shop2020.thriftpy.model.v1.order.ttypes import TransactionServiceException, \
|
| 71 |
TransactionStatus, OrderStatus, DelayReason, ExtraTransactionProcessingType, \
|
71 |
TransactionStatus, OrderStatus, DelayReason, ExtraTransactionProcessingType, \
|
| 72 |
HotspotAction, TimeoutSummary, OrderStatusGroups, OrderType, RechargeOrderStatus, \
|
72 |
HotspotAction, TimeoutSummary, OrderStatusGroups, OrderType, RechargeOrderStatus, \
|
| 73 |
RechargeType, RechargeStatistics, DeviceNumberInfo, EmiChargeType, PayMethod, OrderSource,\
|
73 |
RechargeType, RechargeStatistics, DeviceNumberInfo, EmiChargeType, PayMethod, OrderSource,\
|
| 74 |
StorePaymentStatus, ProductCondition
|
74 |
StorePaymentStatus, ProductCondition, TaxType
|
| 75 |
from shop2020.thriftpy.model.v1.user.ttypes import VoucherType, CouponCategory
|
75 |
from shop2020.thriftpy.model.v1.user.ttypes import VoucherType, CouponCategory
|
| 76 |
from shop2020.thriftpy.payments.ttypes import PaymentException
|
76 |
from shop2020.thriftpy.payments.ttypes import PaymentException
|
| 77 |
#Start:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
77 |
#Start:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
| 78 |
from shop2020.thriftpy.crm.ttypes import *
|
78 |
from shop2020.thriftpy.crm.ttypes import *
|
| 79 |
#End:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
79 |
#End:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
| Line 1484... |
Line 1484... |
| 1484 |
inventory_client = InventoryClient().get_client()
|
1484 |
inventory_client = InventoryClient().get_client()
|
| 1485 |
warehouse = inventory_client.getWarehouse(fulfilmentWarehouseId)
|
1485 |
warehouse = inventory_client.getWarehouse(fulfilmentWarehouseId)
|
| 1486 |
item_pricing = inventory_client.getItemPricing(item_id, warehouse.vendor.id)
|
1486 |
item_pricing = inventory_client.getItemPricing(item_id, warehouse.vendor.id)
|
| 1487 |
lineitem.transfer_price = item_pricing.transferPrice
|
1487 |
lineitem.transfer_price = item_pricing.transferPrice
|
| 1488 |
lineitem.nlc = item_pricing.nlc
|
1488 |
lineitem.nlc = item_pricing.nlc
|
| - |
|
1489 |
if order.taxType == TaxType.CFORM:
|
| - |
|
1490 |
lineitem.vatRate = 2
|
| - |
|
1491 |
else:
|
| 1489 |
lineitem.vatRate = catalog_client.getVatPercentageForItem(lineitem.item_id, warehouse.stateId, lineitem.unit_price)
|
1492 |
lineitem.vatRate = catalog_client.getVatPercentageForItem(lineitem.item_id, warehouse.stateId, lineitem.unit_price)
|
| 1490 |
order.vendorId = warehouse.vendor.id
|
1493 |
order.vendorId = warehouse.vendor.id
|
| 1491 |
except InventoryServiceException as e:
|
1494 |
except InventoryServiceException as e:
|
| 1492 |
print sys.exc_info()[0]
|
1495 |
print sys.exc_info()[0]
|
| 1493 |
print e.message
|
1496 |
print e.message
|
| 1494 |
raise TransactionServiceException(110, 'Transfer price missing for itemId: ' + str(item_id) + ' and vendor: ' + str(warehouse.vendor.id))
|
1497 |
raise TransactionServiceException(110, 'Transfer price missing for itemId: ' + str(item_id) + ' and vendor: ' + str(warehouse.vendor.id))
|