Subversion Repositories SmartDukaan

Rev

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

Rev 23325 Rev 23326
Line 3514... Line 3514...
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:
3518
    if not stateGstRates:
3519
        continue
3519
        return
3520
    for stateGstRate in stateGstRates:
3520
    for stateGstRate in stateGstRates:
3521
        if stateGstRate.itemId:
3521
        if stateGstRate.itemId:
3522
            session.query(StateGstRate).filter(StateGstRate.item_id==stateGstRate.itemId).delete()
3522
            session.query(StateGstRate).filter(StateGstRate.item_id==stateGstRate.itemId).delete()
3523
            for sid in stateIds:
3523
            for sid in stateIds:
3524
                sgr = StateGstRate()
3524
                sgr = StateGstRate()