Subversion Repositories SmartDukaan

Rev

Rev 8942 | Rev 9000 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
104 ashish 1
'''
2
Created on 29-Mar-2010
3
 
4
@author: ashish
5
'''
6
 
7
from shop2020.thriftpy.model.v1.order.ttypes import Transaction as T_Transaction,\
4600 varun.gupt 8
    LineItem as T_LineItem, Order as T_Order, Alert as T_Alert, OrderStatus, DelayReason, \
5527 anupam.sin 9
    PaymentSettlement as T_PaymentSettlement, CODVerificationAgent as T_CODVerificationAgent, \
7080 anupam.sin 10
    Attribute as T_Attribute, EmiScheme as T_EmiScheme, RechargeTransaction as T_rechargeTransaction, \
7311 kshitij.so 11
    FRC as T_FRC, HotspotStore as T_HotSpotStore, SourceDetail as T_SourceDetail , \
7967 anupam.sin 12
    AmazonOrder as T_AmazonOrder, StoreOrderDetail as T_StoreOrderDetail, StoreOrderCollection as T_StoreOrderCollection, \
8488 amar.kumar 13
    HotspotServiceMatrix as T_HotspotServiceMatrix, EbayOrder as T_EbayOrder, \
8990 vikram.rag 14
    AmazonFbaSalesSnapshot as T_AmazonFbaSalesSnapshot, SnapdealOrder as T_SnapdealOrder, \
15
    FlipkartOrder as flipkartOrder 
16
 
17
 
104 ashish 18
from shop2020.utils.Utils import to_java_date
4394 rajveer 19
from shop2020.model.v1.order.impl.DataService import Alert, Transaction
8282 kshitij.so 20
import datetime
104 ashish 21
 
22
def to_t_transaction(transaction):
23
    t_transaction = T_Transaction()
24
    t_transaction.id = transaction.id
483 rajveer 25
    t_transaction.createdOn = to_java_date(transaction.createdOn)
699 chandransh 26
    t_transaction.transactionStatus = transaction.status
483 rajveer 27
    t_transaction.statusDescription = transaction.status_message
28
    t_transaction.customer_id = transaction.customer_id
29
    t_transaction.shoppingCartid = transaction.shopping_cart_id
2219 varun.gupt 30
    t_transaction.coupon_code = transaction.coupon_code
2815 vikas 31
    t_transaction.sessionSource = transaction.session_source
32
    t_transaction.sessionStartTime = to_java_date(transaction.session_start_time)
3858 vikas 33
    t_transaction.firstSource = transaction.first_source
34
    t_transaction.firstSourceTime = to_java_date(transaction.first_source_start_time)
483 rajveer 35
    t_transaction.orders = []
36
    #populate orders
37
    for order in transaction.orders:
38
        t_order = to_t_order(order)
39
        t_transaction.orders.append(t_order)
40
    return t_transaction
41
 
42
def to_t_order(order):
43
    t_order = T_Order()
44
    t_order.id = order.id
45
    t_order.warehouse_id = order.warehouse_id
46
    t_order.logistics_provider_id = order.logistics_provider_id
4815 phani.kuma 47
    if order.doa_logistics_provider_id is not None:
48
        t_order.doa_logistics_provider_id = order.doa_logistics_provider_id
483 rajveer 49
    t_order.airwaybill_no = order.airwaybill_no
50
    t_order.tracking_id = order.tracking_id
51
    t_order.expected_delivery_time = to_java_date(order.expected_delivery_time)
3986 chandransh 52
    t_order.promised_delivery_time = to_java_date(order.promised_delivery_time)
4004 chandransh 53
    t_order.expected_shipping_time = to_java_date(order.expected_shipping_time)
4102 chandransh 54
    t_order.promised_shipping_time = to_java_date(order.promised_shipping_time)
6726 rajveer 55
    t_order.courier_delivery_time = to_java_date(order.courier_delivery_time)
483 rajveer 56
    t_order.customer_id = order.customer_id
57
    t_order.customer_name = order.customer_name
58
    t_order.customer_mobilenumber = order.customer_mobilenumber
59
    t_order.customer_pincode = order.customer_pincode
738 chandransh 60
    t_order.customer_address1 = order.customer_address1
61
    t_order.customer_address2 = order.customer_address2
669 chandransh 62
    t_order.customer_city = order.customer_city
63
    t_order.customer_state = order.customer_state
483 rajveer 64
    t_order.customer_email = order.customer_email    
699 chandransh 65
    t_order.status = order.status 
483 rajveer 66
    t_order.statusDescription = order.statusDescription
67
    t_order.total_amount = order.total_amount
6318 rajveer 68
    t_order.gvAmount = order.gvAmount
483 rajveer 69
    t_order.total_weight = order.total_weight
70
    t_order.created_timestamp = to_java_date(order.created_timestamp)
71
    t_order.invoice_number = order.invoice_number
72
    t_order.billed_by = order.billed_by
986 chandransh 73
    t_order.accepted_timestamp = to_java_date(order.accepted_timestamp)
74
    t_order.billing_timestamp = to_java_date(order.billing_timestamp)
75
    t_order.shipping_timestamp = to_java_date(order.shipping_timestamp)
76
    t_order.delivery_timestamp = to_java_date(order.delivery_timestamp)
1208 chandransh 77
    t_order.outofstock_timestamp = to_java_date(order.outofstock_timestamp)
4004 chandransh 78
    t_order.verification_timestamp = to_java_date(order.verification_timestamp)
642 chandransh 79
    t_order.jacket_number = order.jacket_number
1220 chandransh 80
    t_order.receiver = order.receiver
81
    t_order.batchNo = order.batchNo
82
    t_order.serialNo = order.serialNo
2536 chandransh 83
    t_order.doaFlag = order.doaFlag
84
    t_order.pickupRequestNo = order.pickupRequestNo
3064 chandransh 85
    t_order.cod = order.cod
5062 varun.gupt 86
    t_order.originalOrderId = order.originalOrderId
3581 chandransh 87
    if order.delay_reason:
88
        t_order.delayReason = DelayReason._NAMES_TO_VALUES[order.delay_reason]
4647 rajveer 89
    t_order.delayReasonText = order.delayReasonText
2676 vikas 90
    t_order.transactionId = order.transaction_id
483 rajveer 91
    t_order.lineitems = []
92
    for lineitem in order.lineitems:
93
        t_lineitem = to_t_lineitem(lineitem)
94
        t_order.lineitems.append(t_lineitem)
4192 anupam.sin 95
    if order.reship_timestamp:
96
        t_order.reship_timestamp = to_java_date(order.reship_timestamp)
97
    if order.refund_timestamp:
98
        t_order.refund_timestamp = to_java_date(order.refund_timestamp)
4506 phani.kuma 99
    if order.doa_auth_timestamp:
100
        t_order.doa_auth_timestamp = to_java_date(order.doa_auth_timestamp)
4192 anupam.sin 101
    if order.new_order_id:
102
        t_order.new_order_id = order.new_order_id
4581 phani.kuma 103
    t_order.pickup_timestamp = to_java_date(order.pickup_timestamp)
4269 anupam.sin 104
    t_order.previousStatus = order.previousStatus
105
    t_order.vendorId = order.vendorId
4709 rajveer 106
    t_order.refundReason = order.refund_reason
5110 mandeep.dh 107
    t_order.fulfilmentWarehouseId = order.fulfilmentWarehouseId
5189 varun.gupt 108
    t_order.vendorPaid = order.vendor_paid
4758 mandeep.dh 109
    if order.purchase_order_id:
110
        t_order.purchaseOrderId = order.purchase_order_id
5354 anupam.sin 111
    if order.received_return_timestamp:
112
        t_order.received_return_timestamp = to_java_date(order.received_return_timestamp)
113
    if order.first_dlvyatmp_timestamp:
114
        t_order.first_attempt_timestamp = to_java_date(order.first_dlvyatmp_timestamp)
5527 anupam.sin 115
    t_order.orderType = order.orderType
5555 rajveer 116
    t_order.pickupStoreId = order.pickupStoreId
117
    t_order.logisticsCod = not order.pickupStoreId and order.cod
6525 rajveer 118
    t_order.otg = order.otg
6903 anupam.sin 119
    t_order.insurer = order.insurer
120
    t_order.insuranceAmount = order.insuranceAmount
7190 amar.kumar 121
    t_order.freebieItemId = order.freebieItemId
7293 anupam.sin 122
    t_order.source = order.source
123
    t_order.storeId = order.storeId
124
    t_order.advanceAmount = order.advanceAmount
8717 amar.kumar 125
    t_order.productCondition = order.productCondition
483 rajveer 126
    return t_order
127
 
128
def to_t_lineitem(lineitem):
129
    t_lineitem = T_LineItem()
130
    t_lineitem.id = lineitem.id
699 chandransh 131
    t_lineitem.item_id = lineitem.item_id
970 chandransh 132
    t_lineitem.productGroup = lineitem.productGroup
133
    t_lineitem.brand = lineitem.brand
134
    t_lineitem.model_number = lineitem.model_number
135
    t_lineitem.color = lineitem.color
136
    t_lineitem.model_name = lineitem.model_name
137
    t_lineitem.extra_info = lineitem.extra_info
483 rajveer 138
    t_lineitem.unit_weight = lineitem.unit_weight
139
    t_lineitem.unit_price = lineitem.unit_price
140
    t_lineitem.total_price = lineitem.total_price
996 varun.gupt 141
    t_lineitem.transfer_price = lineitem.transfer_price
7672 rajveer 142
    t_lineitem.nlc = lineitem.nlc
483 rajveer 143
    t_lineitem.total_weight = lineitem.total_weight 
669 chandransh 144
    t_lineitem.quantity = lineitem.quantity
2783 chandransh 145
    t_lineitem.item_number = lineitem.item_number
4658 mandeep.dh 146
    t_lineitem.serial_number = lineitem.serial_number
4172 rajveer 147
    t_lineitem.dealText = lineitem.dealText
4295 varun.gupt 148
    t_lineitem.warrantry_expiry_timestamp = to_java_date(lineitem.warranty_expiry_timestamp)
6039 amit.gupta 149
    t_lineitem.vatRate = lineitem.vatRate
4295 varun.gupt 150
 
483 rajveer 151
    return t_lineitem
152
 
153
def to_t_alert(alert):
154
    t_alert = T_Alert()
155
    t_alert.id = alert.id
4394 rajveer 156
    t_alert.description = alert.description
483 rajveer 157
    try:
4394 rajveer 158
        t_alert.timestamp = to_java_date(alert.timestamp)
483 rajveer 159
    except:
160
        pass
161
    t_alert.type = alert.type
4394 rajveer 162
    t_alert.status = alert.status
2783 chandransh 163
    return t_alert
4600 varun.gupt 164
 
165
def to_t_payment_settlement(payment_settlement):
166
    t_payment_settlement = T_PaymentSettlement()
167
 
168
    if payment_settlement:
4905 varun.gupt 169
        t_payment_settlement.referenceId = payment_settlement.referenceId
4600 varun.gupt 170
        t_payment_settlement.paymentGatewayId = payment_settlement.paymentGatewayId
171
        t_payment_settlement.settlementDate = to_java_date(payment_settlement.settlementDate)
172
        t_payment_settlement.serviceTax = payment_settlement.serviceTax
173
        t_payment_settlement.otherCharges = payment_settlement.otherCharges
174
        t_payment_settlement.netCollection = payment_settlement.netCollection
5447 anupam.sin 175
    return t_payment_settlement
176
 
177
def to_t_verification_agent(codVerificationAgent):
178
    t_verification_agent = T_CODVerificationAgent()
179
 
180
    if codVerificationAgent:
181
        t_verification_agent.orderId = codVerificationAgent.orderId
182
        t_verification_agent.agentEmailId = codVerificationAgent.verificationAgent
5527 anupam.sin 183
    return t_verification_agent    
184
 
185
def to_t_attribute(attribute):
6396 amit.gupta 186
    t_attribute = T_Attribute() 
5527 anupam.sin 187
    if attribute:
188
        t_attribute.name = attribute.name
189
        t_attribute.value = attribute.value
6396 amit.gupta 190
    return t_attribute
191
 
192
def to_t_emi_scheme(emi_scheme):
193
    t_emi_scheme = T_EmiScheme()
194
    if emi_scheme:
195
        t_emi_scheme.id = emi_scheme.id
196
        t_emi_scheme.bankId = emi_scheme.bankId
197
        t_emi_scheme.bankName = emi_scheme.bankName
198
        t_emi_scheme.gatewayId = emi_scheme.gatewayId
199
        t_emi_scheme.tenure = emi_scheme.tenure
200
        t_emi_scheme.tenureDescription = emi_scheme.tenureDescription
201
        t_emi_scheme.minAmount = emi_scheme.minAmount
202
        t_emi_scheme.chargeType = emi_scheme.chargeType
203
        t_emi_scheme.chargeValue = emi_scheme.chargeValue
8942 rajveer 204
        t_emi_scheme.interestRate = emi_scheme.interestRate
7073 anupam.sin 205
    return t_emi_scheme
206
 
207
def to_t_rechargeTransaction(rechargeTransaction):
208
    t_recharge = T_rechargeTransaction()
209
    if rechargeTransaction:
7080 anupam.sin 210
        t_recharge.id = rechargeTransaction.id
211
        t_recharge.amount = rechargeTransaction.amount 
7075 rajveer 212
        t_recharge.circleId = rechargeTransaction.circleId
213
        t_recharge.operatorId = rechargeTransaction.operatorId
214
        t_recharge.plan = rechargeTransaction.plan 
7073 anupam.sin 215
        t_recharge.deviceNum = rechargeTransaction.deviceNum
216
        t_recharge.deviceType = rechargeTransaction.deviceType
217
        t_recharge.discount = rechargeTransaction.discount 
218
        t_recharge.email = rechargeTransaction.email
219
        t_recharge.name = rechargeTransaction.name
220
        t_recharge.cafNum = rechargeTransaction.cafNum
221
        t_recharge.simNum = rechargeTransaction.simNum
222
        t_recharge.isFrc = rechargeTransaction.isFrc
223
        t_recharge.status = rechargeTransaction.status
224
        t_recharge.storeId = rechargeTransaction.storeId
7080 anupam.sin 225
        t_recharge.alternateNum = rechargeTransaction.alternateNumber
226
        t_recharge.transactionTime = to_java_date(rechargeTransaction.transactionTime)
7096 anupam.sin 227
        t_recharge.description = rechargeTransaction.description
7139 amit.gupta 228
        t_recharge.payMethod = rechargeTransaction.payMethod
7169 anupam.sin 229
        t_recharge.paymentAmount = rechargeTransaction.paymentAmount
7369 rajveer 230
        t_recharge.spiceTID = rechargeTransaction.spiceTID
231
        t_recharge.providerTID = rechargeTransaction.providerTID
232
        t_recharge.aggTID = rechargeTransaction.aggTID
7080 anupam.sin 233
    return t_recharge
234
 
235
def to_t_frc(frc):
236
    t_frc = T_FRC()
237
    if frc:
238
        t_frc.id = frc.id
239
        t_frc.operatorId =frc.operatorId
240
        t_frc.circleId = frc.circleId
241
        t_frc.denomination = frc.denomination
242
        t_frc.maxDiscount = frc.maxDiscount
7096 anupam.sin 243
    return t_frc
244
 
245
def to_t_hotspot(hotspot):
246
    t_hotspot = T_HotSpotStore();
247
    if hotspot:
248
        t_hotspot.id = hotspot.id 
249
        t_hotspot.hotspotId = hotspot.hotspotId
250
        t_hotspot.companyId = hotspot.companyId
251
        t_hotspot.name = hotspot.name
252
        t_hotspot.city = hotspot.city
253
        t_hotspot.collectedAmount = hotspot.collectedAmount
254
        t_hotspot.availableLimit = hotspot.availableLimit
255
        t_hotspot.creditLimit = hotspot.creditLimit
256
        t_hotspot.salt = hotspot.salt
257
        t_hotspot.password = hotspot.password
258
        t_hotspot.isActive = hotspot.isActive
259
        t_hotspot.circleId = hotspot.circleId
7169 anupam.sin 260
        t_hotspot.email = hotspot.email
7308 rajveer 261
        t_hotspot.line1 = hotspot.line1
262
        t_hotspot.line2 = hotspot.line2
263
        t_hotspot.state = hotspot.state
264
        t_hotspot.pin = hotspot.pin
265
        t_hotspot.phone = hotspot.phone
266
        t_hotspot.approvalEmail = hotspot.approvalEmail
267
 
268
 
7263 anupam.sin 269
    return t_hotspot
270
 
271
def to_t_sourcedetail(detail):
272
    t_sourcedetail = T_SourceDetail()
273
    if detail:
274
        t_sourcedetail.id = detail.id
275
        t_sourcedetail.name = detail.name
276
        t_sourcedetail.email = detail.email
7410 amar.kumar 277
        t_sourcedetail.tinNumber = detail.tinNumber
7530 kshitij.so 278
        t_sourcedetail.lastUpdatedOn = to_java_date(detail.lastUpdatedOn)
7311 kshitij.so 279
    return t_sourcedetail
280
 
281
def to_t_amazonorder(AmazonOrder):
282
    t_amazonorder = T_AmazonOrder()
283
    t_amazonorder.orderId=AmazonOrder.orderId
284
    t_amazonorder.amazonOrderCode=AmazonOrder.amazonOrderCode
285
    t_amazonorder.amazonOrderItemCode=AmazonOrder.amazonOrderItemCode
286
    t_amazonorder.transactionId=AmazonOrder.transactionId
287
    t_amazonorder.item_id=AmazonOrder.item_id
288
    t_amazonorder.status=AmazonOrder.status
7386 anupam.sin 289
    return t_amazonorder
290
 
291
def to_t_storeOrderDetail(storeOrderDetail):
292
    t_storeOrderDetail = T_StoreOrderDetail()
293
    if storeOrderDetail:
294
        t_storeOrderDetail.orderId = storeOrderDetail.orderId
295
        t_storeOrderDetail.storeId = storeOrderDetail.storeId
296
        t_storeOrderDetail.advanceAmount = storeOrderDetail.advanceAmount
297
        t_storeOrderDetail.cashAmount = storeOrderDetail.cashAmount
298
        t_storeOrderDetail.cardAmount = storeOrderDetail.cardAmount
299
        t_storeOrderDetail.payStatus = storeOrderDetail.payStatus
7393 anupam.sin 300
        t_storeOrderDetail.edcBank = storeOrderDetail.edcBank
301
        t_storeOrderDetail.cashRefundAmount = storeOrderDetail.cashRefundAmount
302
        t_storeOrderDetail.cardRefundAmount = storeOrderDetail.cardRefundAmount
7423 anupam.sin 303
        t_storeOrderDetail.approvalCode = storeOrderDetail.approvalCode
7611 anupam.sin 304
        t_storeOrderDetail.cardType = storeOrderDetail.cardType
7426 anupam.sin 305
    return t_storeOrderDetail
306
 
307
def to_t_storeOrderCollection(storeOrderCollection):
308
    t_storeOrderCollection = T_StoreOrderCollection()
309
    if storeOrderCollection:
310
        t_storeOrderCollection.hotspotId = storeOrderCollection.hotspotId
311
        t_storeOrderCollection.orderId = storeOrderCollection.orderId
312
        t_storeOrderCollection.collectionType = storeOrderCollection.collectionType
313
        t_storeOrderCollection.productName = storeOrderCollection.productName
314
        t_storeOrderCollection.advanceAmount = storeOrderCollection.advanceAmount
315
        t_storeOrderCollection.cash = storeOrderCollection.cash
316
        t_storeOrderCollection.card = storeOrderCollection.card
7427 anupam.sin 317
        t_storeOrderCollection.addedAt = to_java_date(storeOrderCollection.addedAt)
318
        t_storeOrderCollection.pushedAt = to_java_date(storeOrderCollection.pushedAt)
7426 anupam.sin 319
        t_storeOrderCollection.pushedToOcr = storeOrderCollection.pushedToOcr
7967 anupam.sin 320
    return t_storeOrderCollection
321
 
322
def to_t_hotspotServiceMatrix(hotspotServiceMatrix):
323
    t_hotspotServiceMatrix = T_HotspotServiceMatrix()
324
    if hotspotServiceMatrix:
325
        t_hotspotServiceMatrix.storeId = hotspotServiceMatrix.storeId
326
        t_hotspotServiceMatrix.hotspotId = hotspotServiceMatrix.hotspotId
327
        t_hotspotServiceMatrix.rechargeService = hotspotServiceMatrix.rechargeService
328
        t_hotspotServiceMatrix.storeWebsiteService = hotspotServiceMatrix.storeWebsiteService
329
        t_hotspotServiceMatrix.pickupFromStoreService = hotspotServiceMatrix.pickupFromStoreService
330
    return t_hotspotServiceMatrix
8182 amar.kumar 331
 
332
def to_t_ebayOrder(ebayOrder):
333
    t_ebayOrder = T_EbayOrder()
334
    t_ebayOrder.orderId = ebayOrder.orderId
335
    t_ebayOrder.salesRecordNumber = ebayOrder.salesRecordNumber
336
    t_ebayOrder.paisaPayId = ebayOrder.paisaPayId
337
    t_ebayOrder.ebayListingId = ebayOrder.ebayListingId
338
    t_ebayOrder.subsidyAmount = ebayOrder.subsidyAmount
339
    t_ebayOrder.ebayTxnDate = to_java_date(ebayOrder.ebayTxnDate)
340
    t_ebayOrder.transactionId = ebayOrder.transactionId
341
    t_ebayOrder.listingName = ebayOrder.listingName
342
    t_ebayOrder.listingPrice = ebayOrder.listingPrice
8247 amar.kumar 343
    t_ebayOrder.bluedartPaisaPayRef = ebayOrder.bluedartPaisaPayRef
8182 amar.kumar 344
    return t_ebayOrder 
8488 amar.kumar 345
 
346
def to_t_snapdealOrder(snapdealOrder):
347
    t_snapdealOrder = T_SnapdealOrder()
348
    t_snapdealOrder.orderId = snapdealOrder.orderId
349
    t_snapdealOrder.subOrderId = snapdealOrder.subOrderId
350
    t_snapdealOrder.referenceCode = snapdealOrder.referenceCode
351
    t_snapdealOrder.snapdealTxnDate = to_java_date(snapdealOrder.referenceCode)
352
    t_snapdealOrder.productName = snapdealOrder.productName
353
    t_snapdealOrder.listingPrice = snapdealOrder.listingPrice
354
    return t_snapdealOrder 
8282 kshitij.so 355
 
356
def to_t_amazonFbaSalesSnapshot(amazonFbaSalesSnapshot):
357
    t_amazonFbaSalesSnapshot = T_AmazonFbaSalesSnapshot()
358
    if amazonFbaSalesSnapshot:
359
        t_amazonFbaSalesSnapshot.dateOfSale = to_java_date(datetime.datetime.combine(amazonFbaSalesSnapshot.dateOfSale,datetime.time(0,0)))
360
        t_amazonFbaSalesSnapshot.item_id    = amazonFbaSalesSnapshot.item_id 
8363 vikram.rag 361
        t_amazonFbaSalesSnapshot.totalOrderCount = amazonFbaSalesSnapshot.totalOrderCount 
8282 kshitij.so 362
        t_amazonFbaSalesSnapshot.amazonFbaInventory = amazonFbaSalesSnapshot.amazonFbaInventory
363
        t_amazonFbaSalesSnapshot.isOutOfStock = amazonFbaSalesSnapshot.isOutOfStock
364
        t_amazonFbaSalesSnapshot.salePrice = amazonFbaSalesSnapshot.salePrice
8445 vikram.rag 365
        t_amazonFbaSalesSnapshot.ourPrice = amazonFbaSalesSnapshot.ourPrice
8282 kshitij.so 366
        if amazonFbaSalesSnapshot.minFbaPrice is not None:
367
            t_amazonFbaSalesSnapshot.minFbaPrice = amazonFbaSalesSnapshot.minFbaPrice
368
        if amazonFbaSalesSnapshot.minMfnPrice is not None:    
369
            t_amazonFbaSalesSnapshot.minMfnPrice = amazonFbaSalesSnapshot.minMfnPrice
8363 vikram.rag 370
        t_amazonFbaSalesSnapshot.totalSale = amazonFbaSalesSnapshot.totalSale
371
        t_amazonFbaSalesSnapshot.promotionSale = amazonFbaSalesSnapshot.promotionSale    
372
        t_amazonFbaSalesSnapshot.promotionOrderCount = amazonFbaSalesSnapshot.promotionOrderCount
8532 vikram.rag 373
        t_amazonFbaSalesSnapshot.ourPriceSnapshotDate = to_java_date(amazonFbaSalesSnapshot.ourPriceSnapshotDate)
374
        t_amazonFbaSalesSnapshot.salePriceSnapshotDate = to_java_date(amazonFbaSalesSnapshot.salePriceSnapshotDate)
375
        t_amazonFbaSalesSnapshot.minFbaPriceSnapshotDate = to_java_date(amazonFbaSalesSnapshot.minFbaPriceSnapshotDate)
376
        t_amazonFbaSalesSnapshot.minMfnPriceSnapshotDate = to_java_date(amazonFbaSalesSnapshot.minMfnPriceSnapshotDate)
8282 kshitij.so 377
    return t_amazonFbaSalesSnapshot
8990 vikram.rag 378
 
379
def to_t_flipkartOrder(flipkartorder):
380
    flipkartOrder = flipkartOrder()
381
    if flipkartorder:
382
        flipkartOrder.emiFee = flipkartorder.emiFee
383
        flipkartOrder.orderId = flipkartorder.orderId
384
        flipkartOrder.octroiFee = flipkartorder.octroiFee
385
        flipkartOrder.flipkartOrderId = flipkartorder.flipkartOrderId
386
        flipkartOrder.flipkartSubOrderId = flipkartorder.flipkartSubOrderId
387
        flipkartOrder.flipkartTxnDate = to_java_date(flipkartorder.flipkartTxnDate)
388
        flipkartOrder.shippingPrice = flipkartorder.shippingPrice
389
    return flipkartOrder     
390
 
391
 
8282 kshitij.so 392
 
7967 anupam.sin 393