Subversion Repositories SmartDukaan

Rev

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

Rev 9486 Rev 9805
Line 55... Line 55...
55
            item.preferredInsurer = preferred_vendor
55
            item.preferredInsurer = preferred_vendor
56
            item.risky = risky
56
            item.risky = risky
57
            item.weight = weight
57
            item.weight = weight
58
            item.updatedOn = updatedOn
58
            item.updatedOn = updatedOn
59
            item.type = int(item_type)
59
            item.type = int(item_type)
-
 
60
            for c in (1,2,3,4,5):
-
 
61
                try:
60
            item_id = cclient.addItem(item)
62
                    item_id = cclient.addItem(item)
-
 
63
                    break
-
 
64
                except Exception as e:
-
 
65
                    cclient = CatalogClient().get_client()       
61
            
66
            
62
            vip = VendorItemPricing()
67
            vip = VendorItemPricing()
63
            vip.itemId = item_id
68
            vip.itemId = item_id
64
            vip.dealerPrice = round(dp)
69
            vip.dealerPrice = round(dp)
65
            vip.mop = round(mop)
70
            vip.mop = round(mop)
66
            vip.nlc = round(nlc)
71
            vip.nlc = round(nlc)
67
            vip.transferPrice = round(tp)
72
            vip.transferPrice = round(tp)
68
            vip.vendorId = preferred_vendor
73
            vip.vendorId = preferred_vendor
-
 
74
            for c in (1,2,3,4,5):
69
            
75
                try:
70
            iclient.addVendorItemPricing(vip)
76
                    iclient.addVendorItemPricing(vip)
-
 
77
                    break
-
 
78
                except Exception as e:
-
 
79
                    iclient = InventoryClient().get_client()
-
 
80
                    
71
        except Exception as e:
81
        except Exception as e:
72
            cclient = CatalogClient().get_client()
-
 
73
            iclient = InventoryClient().get_client()
-
 
74
            message = message + "\t" + str(brand) + "\t" + str(model_name) + "\t" + str(model_number) + "\t" + str(e.message) + "\n"
82
            message = message + "\t" + str(brand) + "\t" + str(model_name) + "\t" + str(model_number) + "\t" + str(e.message) + "\n"
75
    
83
    
76
    mail("build@shop2020.in", "cafe@nes", ["rajveer.singh@shop2020.in", "chandan.kumar@shop2020.in"], "Problem while adding items", message, [], [], [])    
84
    mail("build@shop2020.in", "cafe@nes", ["rajveer.singh@shop2020.in", "chandan.kumar@shop2020.in"], "Problem while adding items", message, [], [], [])    
77
    print "Successfully updated the item list information."
85
    print "Successfully updated the item list information."
78
 
86