Subversion Repositories SmartDukaan

Rev

Rev 20638 | Rev 20641 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20638 Rev 20639
Line 2151... Line 2151...
2151
    if order.warehouse_id == 3298:
2151
    if order.warehouse_id == 3298:
2152
        if order.customer_pincode in telenganaPincodes:
2152
        if order.customer_pincode in telenganaPincodes:
2153
            return 0
2153
            return 0
2154
        return 1
2154
        return 1
2155
    if order.warehouse_id == 7441:
2155
    if order.warehouse_id == 7441:
2156
        for pincode in haryanaPincodes:
-
 
2157
            if order.customer_pincode == pincode:
2156
        if order.customer_pincode in haryanaPincodes:
2158
                return 0
2157
            return 0
2159
        return 1
2158
        return 1
2160
    return 0
2159
    return 0
2161
    #raise TransactionServiceException(110, "No Vat/CST logic defined for warehouse " + str(order.warehouse_id)) 
2160
    #raise TransactionServiceException(110, "No Vat/CST logic defined for warehouse " + str(order.warehouse_id)) 
2162
 
2161
 
2163
def add_billing_details(orderId, invoice_number, serialNumbers, itemNumbers, freebieWarehouseId, billedBy, jacketNumber, billingType, fulfilmentWarehouseId, authorize):
2162
def add_billing_details(orderId, invoice_number, serialNumbers, itemNumbers, freebieWarehouseId, billedBy, jacketNumber, billingType, fulfilmentWarehouseId, authorize):
Line 2167... Line 2166...
2167
    order = Order.get_by(id=orderId)
2166
    order = Order.get_by(id=orderId)
2168
    if not order:
2167
    if not order:
2169
        raise TransactionServiceException(101, "No order found for the given order id" + str(orderId))
2168
        raise TransactionServiceException(101, "No order found for the given order id" + str(orderId))
2170
    
2169
    
2171
    newTaxType = __getOrderTaxType(order)
2170
    newTaxType = __getOrderTaxType(order)
2172
    if order.taxType == 2:
2171
    if order.taxType == TaxType.CFORM and newTaxType == TaxType.VAT:
2173
        if newTaxType == 0:
-
 
2174
            raise TransactionServiceException(101, "C-Form billing is not allowed for same state for Order" + str(orderId))
2172
            raise TransactionServiceException(101, "C-Form billing is not allowed for same state for Order" + str(orderId))
2175
    else:
2173
    else:
2176
        order.taxType = newTaxType
2174
        order.taxType = newTaxType
2177
    
2175
    
2178
    
2176
    
Line 8814... Line 8812...
8814
    nonSerializedUsedInventoryMap = {}
8812
    nonSerializedUsedInventoryMap = {}
8815
    for order in ordersList:
8813
    for order in ordersList:
8816
        scanList = []
8814
        scanList = []
8817
        inventoryItemList = []
8815
        inventoryItemList = []
8818
        newTaxType = __getOrderTaxType(order)
8816
        newTaxType = __getOrderTaxType(order)
8819
        if order.taxType == 2:
8817
        if order.taxType == TaxType.CFORM and newTaxType == TaxType.VAT:
8820
            if newTaxType == 0:
-
 
8821
                raise TransactionServiceException(302, "C-Form billing is not allowed for same state for Order" + str(order.id))
8818
                raise TransactionServiceException(302, "C-Form billing is not allowed for same state for Order" + str(order.id))
8822
        else:
8819
        else:
8823
            order.taxType = newTaxType
8820
            order.taxType = newTaxType
8824
        
8821
        
8825
        if jacketNumber is None or jacketNumber <= 0:
8822
        if jacketNumber is None or jacketNumber <= 0: