Subversion Repositories SmartDukaan

Rev

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

Rev 23313 Rev 23323
Line 3513... Line 3513...
3513
 
3513
 
3514
def add_state_gst_rates(stateGstRates):
3514
def add_state_gst_rates(stateGstRates):
3515
    #lets keep rates only for haryana and delhi i.e. 0 and 3
3515
    #lets keep rates only for haryana and delhi i.e. 0 and 3
3516
    stateIds = [-1, 0, 3]
3516
    stateIds = [-1, 0, 3]
3517
    s = StateGstRate()
3517
    s = StateGstRate()
-
 
3518
    if not stateGstRates:
-
 
3519
        continue
3518
    for stateGstRate in stateGstRates:
3520
    for stateGstRate in stateGstRates:
3519
        session.query(StateGstRate).filter(StateGstRate.item_id==stateGstRate.itemId).delete()
3521
        session.query(StateGstRate).filter(StateGstRate.item_id==stateGstRate.itemId).delete()
3520
        for sid in stateIds:
3522
        for sid in stateIds:
3521
            sgr = StateGstRate()
3523
            sgr = StateGstRate()
3522
            sgr.item_id = stateGstRate.itemId
3524
            sgr.item_id = stateGstRate.itemId