Subversion Repositories SmartDukaan

Rev

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

Rev 19986 Rev 19987
Line 2401... Line 2401...
2401
                session.commit()
2401
                session.commit()
2402
                return True
2402
                return True
2403
        if billingType == BillingType.OURS or billingType == BillingType.OURS_EXTERNAL:
2403
        if billingType == BillingType.OURS or billingType == BillingType.OURS_EXTERNAL:
2404
            #as of now only company 2 - SORPL, 3-New company is operating and cutoff config will decide the company to be used to bill
2404
            #as of now only company 2 - SORPL, 3-New company is operating and cutoff config will decide the company to be used to bill
2405
            #until further change - Amit Gupta
2405
            #until further change - Amit Gupta
2406
            seller_id = __get_seller()
2406
            seller_id = __get_seller(order.warehouse_id)
2407
            order.invoice_number = get_next_invoice_counter(seller_id, order.warehouse_id, order.orderType)
2407
            order.invoice_number = get_next_invoice_counter(seller_id, order.warehouse_id, order.orderType)
2408
            order.seller_id = seller_id
2408
            order.seller_id = seller_id
2409
            whaddressmapping = WarehouseAddressMapping.query.filter_by(warehouse_id=order.warehouse_id).one()
2409
            whaddressmapping = WarehouseAddressMapping.query.filter_by(warehouse_id=order.warehouse_id).one()
2410
            order.warehouse_address_id = whaddressmapping.address_id
2410
            order.warehouse_address_id = whaddressmapping.address_id
2411
        session.commit()
2411
        session.commit()
Line 9335... Line 9335...
9335
        warehouseDbConnection.close()
9335
        warehouseDbConnection.close()
9336
    session.commit()
9336
    session.commit()
9337
    
9337
    
9338
    if billingType == BillingType.OURS or billingType == BillingType.OURS_EXTERNAL:
9338
    if billingType == BillingType.OURS or billingType == BillingType.OURS_EXTERNAL:
9339
        #get seller for current warehouse id
9339
        #get seller for current warehouse id
9340
        seller_id  = __get_seller()
9340
        seller_id  = __get_seller(order.warehouse_id)
9341
        whaddressmapping = WarehouseAddressMapping.query.filter_by(warehouse_id=ordersList[0].warehouse_id).one()
9341
        whaddressmapping = WarehouseAddressMapping.query.filter_by(warehouse_id=ordersList[0].warehouse_id).one()
9342
        invoiceNumber = get_next_invoice_counter(seller_id, ordersList[0].warehouse_id, ordersList[0].orderType)
9342
        invoiceNumber = get_next_invoice_counter(seller_id, ordersList[0].warehouse_id, ordersList[0].orderType)
9343
            
9343
            
9344
            
9344
            
9345
    
9345