Subversion Repositories SmartDukaan

Rev

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

Rev 10959 Rev 10960
Line 740... Line 740...
740
            #target_nlc = proposed_tp - snapdealPricing.lowestPossibleTp + snapdealItemInfo.nlc
740
            #target_nlc = proposed_tp - snapdealPricing.lowestPossibleTp + snapdealItemInfo.nlc
741
        sheet.write(sheet_iterator, 25, round(proposed_tp,2))
741
        sheet.write(sheet_iterator, 25, round(proposed_tp,2))
742
        sheet.write(sheet_iterator, 26, round(proposed_sp,2))
742
        sheet.write(sheet_iterator, 26, round(proposed_sp,2))
743
        sheet.write(sheet_iterator, 27, round((proposed_tp - snapdealPricing.ourTp),2))
743
        sheet.write(sheet_iterator, 27, round((proposed_tp - snapdealPricing.ourTp),2))
744
        mp_history_item = session.query(MarketPlaceHistory).filter(MarketPlaceHistory.timestamp==timestamp).filter(MarketPlaceHistory.item_id==snapdealItemInfo.item_id).filter(MarketPlaceHistory.source==OrderSource.SNAPDEAL).one()
744
        mp_history_item = session.query(MarketPlaceHistory).filter(MarketPlaceHistory.timestamp==timestamp).filter(MarketPlaceHistory.item_id==snapdealItemInfo.item_id).filter(MarketPlaceHistory.source==OrderSource.SNAPDEAL).one()
745
        if mp_history_item is None:
745
        if mp_history_item.decision is None:
746
            sheet.write(sheet_iterator, 28, 'Auto Pricing Inactive')
746
            sheet.write(sheet_iterator, 28, 'Auto Pricing Inactive')
747
            sheet_iterator+=1
747
            sheet_iterator+=1
748
            continue
748
            continue
749
        sheet.write(sheet_iterator, 28, Decision._VALUES_TO_NAMES.get(mp_history_item.decision))
749
        sheet.write(sheet_iterator, 28, Decision._VALUES_TO_NAMES.get(mp_history_item.decision))
750
        sheet.write(sheet_iterator, 29, mp_history_item.reason)
750
        sheet.write(sheet_iterator, 29, mp_history_item.reason)
Line 841... Line 841...
841
            proposed_tp = getTargetTp(proposed_sp,mpItem)
841
            proposed_tp = getTargetTp(proposed_sp,mpItem)
842
        sheet.write(sheet_iterator, 26, round(proposed_tp,2))
842
        sheet.write(sheet_iterator, 26, round(proposed_tp,2))
843
        sheet.write(sheet_iterator, 27, round(proposed_sp,2))
843
        sheet.write(sheet_iterator, 27, round(proposed_sp,2))
844
        sheet.write(sheet_iterator, 28, getSalesPotential(snapdealDetails.lowestOfferPrice,snapdealItemInfo.nlc))
844
        sheet.write(sheet_iterator, 28, getSalesPotential(snapdealDetails.lowestOfferPrice,snapdealItemInfo.nlc))
845
        mp_history_item = session.query(MarketPlaceHistory).filter(MarketPlaceHistory.timestamp==timestamp).filter(MarketPlaceHistory.item_id==snapdealItemInfo.item_id).filter(MarketPlaceHistory.source==OrderSource.SNAPDEAL).one()
845
        mp_history_item = session.query(MarketPlaceHistory).filter(MarketPlaceHistory.timestamp==timestamp).filter(MarketPlaceHistory.item_id==snapdealItemInfo.item_id).filter(MarketPlaceHistory.source==OrderSource.SNAPDEAL).one()
846
        if mp_history_item is None:
846
        if mp_history_item.decision is None:
847
            sheet.write(sheet_iterator, 29, 'Auto pricing Inactive')
847
            sheet.write(sheet_iterator, 29, 'Auto pricing Inactive')
848
            sheet_iterator+=1
848
            sheet_iterator+=1
849
            continue
849
            continue
850
        sheet.write(sheet_iterator, 29, Decision._VALUES_TO_NAMES.get(mp_history_item.decision))
850
        sheet.write(sheet_iterator, 29, Decision._VALUES_TO_NAMES.get(mp_history_item.decision))
851
        sheet.write(sheet_iterator, 30, mp_history_item.reason)
851
        sheet.write(sheet_iterator, 30, mp_history_item.reason)