Subversion Repositories SmartDukaan

Rev

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

Rev 11465 Rev 11467
Line 69... Line 69...
69
    InventoryServiceException, WarehouseType, InventoryType
69
    InventoryServiceException, WarehouseType, InventoryType
70
from shop2020.thriftpy.model.v1.order.ttypes import TransactionServiceException, \
70
from shop2020.thriftpy.model.v1.order.ttypes import TransactionServiceException, \
71
    TransactionStatus, OrderStatus, DelayReason, ExtraTransactionProcessingType, \
71
    TransactionStatus, OrderStatus, DelayReason, ExtraTransactionProcessingType, \
72
    HotspotAction, TimeoutSummary, OrderStatusGroups, OrderType, RechargeOrderStatus, \
72
    HotspotAction, TimeoutSummary, OrderStatusGroups, OrderType, RechargeOrderStatus, \
73
    RechargeType, RechargeStatistics, DeviceNumberInfo, EmiChargeType, PayMethod, OrderSource,\
73
    RechargeType, RechargeStatistics, DeviceNumberInfo, EmiChargeType, PayMethod, OrderSource,\
74
    StorePaymentStatus, ProductCondition, TaxType
74
    StorePaymentStatus, ProductCondition, TaxType,AmazonFCWarehouseLocation
75
from shop2020.thriftpy.model.v1.user.ttypes import VoucherType, CouponCategory, User, Sex
75
from shop2020.thriftpy.model.v1.user.ttypes import VoucherType, CouponCategory, User, Sex
76
from shop2020.thriftpy.payments.ttypes import PaymentException
76
from shop2020.thriftpy.payments.ttypes import PaymentException
77
#Start:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
77
#Start:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
78
from shop2020.thriftpy.crm.ttypes import *
78
from shop2020.thriftpy.crm.ttypes import *
79
#End:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
79
#End:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
Line 6274... Line 6274...
6274
    
6274
    
6275
    session.commit()
6275
    session.commit()
6276
    return new_order
6276
    return new_order
6277
 
6277
 
6278
def add_or_update_amazon_fba_sales_snapshot(amazonfbasalessnapshot):
6278
def add_or_update_amazon_fba_sales_snapshot(amazonfbasalessnapshot):
6279
    salesnapshotfordate = AmazonFbaSalesSnapshot.get_by(item_id = amazonfbasalessnapshot.item_id,dateOfSale=to_py_date(amazonfbasalessnapshot.dateOfSale).date(),fcLocation=amazonfbasalessnapshot.fcLocation)
6279
    salesnapshotfordate = AmazonFbaSalesSnapshot.get_by(item_id = amazonfbasalessnapshot.item_id,dateOfSale=to_py_date(amazonfbasalessnapshot.dateOfSale).date(),fcLocation=AmazonFCWarehouseLocation._NAMES_TO_VALUES.get(amazonfbasalessnapshot.fcLocation))
6280
    if salesnapshotfordate is None:
6280
    if salesnapshotfordate is None:
6281
        amazon_fba_sales_snapshot = AmazonFbaSalesSnapshot()
6281
        amazon_fba_sales_snapshot = AmazonFbaSalesSnapshot()
6282
        amazon_fba_sales_snapshot.dateOfSale = to_py_date(amazonfbasalessnapshot.dateOfSale).date()
6282
        amazon_fba_sales_snapshot.dateOfSale = to_py_date(amazonfbasalessnapshot.dateOfSale).date()
6283
        amazon_fba_sales_snapshot.item_id = amazonfbasalessnapshot.item_id
6283
        amazon_fba_sales_snapshot.item_id = amazonfbasalessnapshot.item_id
6284
        amazon_fba_sales_snapshot.totalOrderCount = amazonfbasalessnapshot.totalOrderCount
6284
        amazon_fba_sales_snapshot.totalOrderCount = amazonfbasalessnapshot.totalOrderCount