Subversion Repositories SmartDukaan

Rev

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

Rev 19077 Rev 19137
Line 8200... Line 8200...
8200
                orderFulfillmentWarehouse = cursor.fetchone()
8200
                orderFulfillmentWarehouse = cursor.fetchone()
8201
            except Exception as e:
8201
            except Exception as e:
8202
                print "Error: unable to fetch data 2"
8202
                print "Error: unable to fetch data 2"
8203
            
8203
            
8204
            
8204
            
-
 
8205
            if order.productCondition != ProductCondition.BAD:
8205
            if orderFulfillmentWarehouse is not None:
8206
                if orderFulfillmentWarehouse is not None:
8206
                itemPricing = None
8207
                    itemPricing = None
8207
                selectSql = "select * from vendoritempricing where item_id = %d and vendor_id = %d"%(itemId,orderFulfillmentWarehouse[2])
8208
                    selectSql = "select * from vendoritempricing where item_id = %d and vendor_id = %d"%(itemId,orderFulfillmentWarehouse[2])
8208
                try:
8209
                    try:
8209
                    cursor = conn.cursor()
8210
                        cursor = conn.cursor()
8210
                    cursor.execute(selectSql)
8211
                        cursor.execute(selectSql)
8211
                    itemPricing = cursor.fetchone()
8212
                        itemPricing = cursor.fetchone()
8212
                except Exception as e:
8213
                    except Exception as e:
8213
                    print "Error: unable to fetch data 3"
8214
                        print "Error: unable to fetch data 3"
8214
                    
8215
                        
8215
                if itemPricing is None:
8216
                    if itemPricing is None:
8216
                    raise TransactionServiceException(214, "Vendor Item Pricing Missing For Item Id "+str(itemId)+ " and Fulfillment Warehouse "+ str(orderFulfillmentWarehouse[1]))
8217
                        raise TransactionServiceException(214, "Vendor Item Pricing Missing For Item Id "+str(itemId)+ " and Fulfillment Warehouse "+ str(orderFulfillmentWarehouse[1]))
8217
                else:
8218
                    else:
8218
                    order.lineitems[0].transfer_price = itemPricing[4]
8219
                        order.lineitems[0].transfer_price = itemPricing[4]
8219
                    order.lineitems[0].nlc = itemPricing[5]
8220
                        order.lineitems[0].nlc = itemPricing[5]
8220
        else:
8221
        else:
8221
            conn.close()
8222
            conn.close()
8222
            raise TransactionServiceException(216, "Order in Unacceptable Status.. "+str(order.id))
8223
            raise TransactionServiceException(216, "Order in Unacceptable Status.. "+str(order.id))
8223
    try:
8224
    try:
8224
        conn.commit()
8225
        conn.commit()