Subversion Repositories SmartDukaan

Rev

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

Rev 12328 Rev 12338
Line 2769... Line 2769...
2769
            <th>Commission %</th>
2769
            <th>Commission %</th>
2770
            <th>Return Provision %</th>
2770
            <th>Return Provision %</th>
2771
            <th>Flipkart Inventory</th>
2771
            <th>Flipkart Inventory</th>
2772
            <th>Total Inventory</th>
2772
            <th>Total Inventory</th>
2773
            <th>Sales History</th>
2773
            <th>Sales History</th>
-
 
2774
            <th>Action</th>
2774
            </tr></thead>
2775
            </tr></thead>
2775
            <tbody>"""
2776
            <tbody>"""
2776
    for item in inactiveAutoPricing:
2777
    for item in inactiveAutoPricing:
2777
        mpHistory = item[0]
2778
        mpHistory = item[0]
2778
        catItem = item[1]
2779
        catItem = item[1]
Line 2780... Line 2781...
2780
        netInventory=''
2781
        netInventory=''
2781
        if not inventoryMap.has_key(mpHistory.item_id):
2782
        if not inventoryMap.has_key(mpHistory.item_id):
2782
            netInventory='Info Not Available'
2783
            netInventory='Info Not Available'
2783
        else:
2784
        else:
2784
            netInventory = str(getNetAvailability(inventoryMap.get(mpHistory.item_id)))
2785
            netInventory = str(getNetAvailability(inventoryMap.get(mpHistory.item_id)))
-
 
2786
        if (mpHistory.competitiveCategory==2):
-
 
2787
            decision="Auto Increment"
2785
        mpItem = MarketplaceItems.get_by(itemId=mpHistory.item_id,source=OrderSource.FLIPKART)
2788
        elif (mpHistory.competitiveCategory in (3,8)):
-
 
2789
            decision="Auto Decrement"
-
 
2790
        else:
-
 
2791
            decision=""
2786
        message+="""<tr>
2792
        message+="""<tr>
2787
            <td style="text-align:center">"""+str(mpHistory.item_id)+"""</td>
2793
            <td style="text-align:center">"""+str(mpHistory.item_id)+"""</td>
2788
            <td style="text-align:center">"""+xstr(catItem.brand)+" "+xstr(catItem.model_name)+" "+xstr(catItem.model_number)+" "+xstr(catItem.color)+"""</td>
2794
            <td style="text-align:center">"""+xstr(catItem.brand)+" "+xstr(catItem.model_name)+" "+xstr(catItem.model_number)+" "+xstr(catItem.color)+"""</td>
2789
            <td style="text-align:center">"""+str(mpHistory.ourSellingPrice)+"""</td>
2795
            <td style="text-align:center">"""+str(mpHistory.ourSellingPrice)+"""</td>
2790
            <td style="text-align:center">"""+str(CompetitionCategory._VALUES_TO_NAMES.get(mpHistory.competitiveCategory))+"""</td>
2796
            <td style="text-align:center">"""+str(CompetitionCategory._VALUES_TO_NAMES.get(mpHistory.competitiveCategory))+"""</td>
Line 2793... Line 2799...
2793
            <td style="text-align:center">"""+str(mpItem.commission)+"""</td>
2799
            <td style="text-align:center">"""+str(mpItem.commission)+"""</td>
2794
            <td style="text-align:center">"""+str(mpItem.returnProvision)+" %"+"""</td>
2800
            <td style="text-align:center">"""+str(mpItem.returnProvision)+" %"+"""</td>
2795
            <td style="text-align:center">"""+str(mpHistory.ourInventory)+"""</td>
2801
            <td style="text-align:center">"""+str(mpHistory.ourInventory)+"""</td>
2796
            <td style="text-align:center">"""+netInventory+"""</td>
2802
            <td style="text-align:center">"""+netInventory+"""</td>
2797
            <td style="text-align:center">"""+getOosString((itemSaleMap.get(mpHistory.item_id))[1])+"""</td>
2803
            <td style="text-align:center">"""+getOosString((itemSaleMap.get(mpHistory.item_id))[1])+"""</td>
-
 
2804
            <td style="text-align:center">"""+decision+"""</td>
2798
            </tr>"""
2805
            </tr>"""
2799
    message+="""</tbody></table></body></html>"""
2806
    message+="""</tbody></table></body></html>"""
2800
    print message
2807
    print message
2801
    mailServer = smtplib.SMTP("smtp.gmail.com", 587)
2808
    mailServer = smtplib.SMTP("smtp.gmail.com", 587)
2802
    mailServer.ehlo()
2809
    mailServer.ehlo()