Subversion Repositories SmartDukaan

Rev

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

Rev 12772 Rev 12776
Line 2347... Line 2347...
2347
    invoice_number = entity_id.id + 1
2347
    invoice_number = entity_id.id + 1
2348
    entity_id.id = invoice_number
2348
    entity_id.id = invoice_number
2349
    return invoice_number
2349
    return invoice_number
2350
 
2350
 
2351
def get_next_invoice_counter(orderType, stateId):
2351
def get_next_invoice_counter(orderType, stateId):
-
 
2352
    if OrderType.B2Cbulk == orderType:
-
 
2353
        orderType = OrderType.B2C
2352
    entity_id = InvoiceCounterGenerator.query.filter(InvoiceCounterGenerator.orderType == orderType).filter(InvoiceCounterGenerator.stateId == stateId).with_lockmode("update").one()
2354
    entity_id = InvoiceCounterGenerator.query.filter(InvoiceCounterGenerator.orderType == orderType).filter(InvoiceCounterGenerator.stateId == stateId).with_lockmode("update").one()
2353
    invoice_number = entity_id.id + 1
2355
    invoice_number = entity_id.id + 1
2354
    entity_id.id = invoice_number
2356
    entity_id.id = invoice_number 
2355
    return invoice_number, entity_id.prefix
2357
    ret_invoiceNo = entity_id.prefix + str(invoice_number) 
-
 
2358
    return ret_invoiceNo
2356
 
2359
 
2357
def toggle_doa_flag(order_id):
2360
def toggle_doa_flag(order_id):
2358
    order = get_order(order_id)
2361
    order = get_order(order_id)
2359
    if(order.doaFlag):
2362
    if(order.doaFlag):
2360
        order.doaFlag = False
2363
        order.doaFlag = False