Subversion Repositories SmartDukaan

Rev

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

Rev 8838 Rev 8883
Line 278... Line 278...
278
    
278
    
279
    try:
279
    try:
280
        if orders_not_picked_up:
280
        if orders_not_picked_up:
281
            print "Orders not Picked up:"
281
            print "Orders not Picked up:"
282
            print orders_not_picked_up
282
            print orders_not_picked_up
283
            mismatch_file = "/tmp/BlueDart_PickupMismatch.csv"
283
            mismatch_file = "/tmp/RedExpress_PickupMismatch.csv"
284
            print "Some of our orders were not picked up. Printing report to:" + mismatch_file
284
            print "Some of our orders were not picked up. Printing report to:" + mismatch_file
285
            print_pickup_mismatch_report(mismatch_file, orders_not_picked_up)
285
            print_pickup_mismatch_report(mismatch_file, orders_not_picked_up)
286
            pickup_mismatch_part = [get_attachment_part(mismatch_file)]
286
            pickup_mismatch_part = [get_attachment_part(mismatch_file)]
287
            mail(from_user, from_pwd, to,\
287
            mail(from_user, from_pwd, to,\
288
                 "Order Pickup Mismatch for " + provider.name,\
288
                 "Order Pickup Mismatch for " + provider.name,\
Line 301... Line 301...
301
    
301
    
302
    try:
302
    try:
303
        if orders_pending_local_connection:
303
        if orders_pending_local_connection:
304
            print "Local Connection Pending Orders:"
304
            print "Local Connection Pending Orders:"
305
            print orders_pending_local_connection
305
            print orders_pending_local_connection
306
            mismatch_file = "/tmp/BlueDart_LocalConnectionPendingOrders.csv"
306
            mismatch_file = "/tmp/RedExpress_LocalConnectionPendingOrders.csv"
307
            print "Some of our Orders were not Shipped to Destination yet. Printing report to:" + mismatch_file
307
            print "Some of our Orders were not Shipped to Destination yet. Printing report to:" + mismatch_file
308
            print_undelivered_orders_report(mismatch_file, orders_pending_local_connection)
308
            print_undelivered_orders_report(mismatch_file, orders_pending_local_connection)
309
            pickup_mismatch_part = [get_attachment_part(mismatch_file)]
309
            pickup_mismatch_part = [get_attachment_part(mismatch_file)]
310
            mail(from_user, from_pwd, to,\
310
            mail(from_user, from_pwd, to,\
311
                 "Orders that are not Shipped to Destination yet for " + provider.name,\
311
                 "Orders that are not Shipped to Destination yet for " + provider.name,\
Line 324... Line 324...
324
    
324
    
325
    try:
325
    try:
326
        if returned_orders:
326
        if returned_orders:
327
            print "Returned Orders:"
327
            print "Returned Orders:"
328
            print returned_orders
328
            print returned_orders
329
            returned_orders_file = "/tmp/BlueDart_ReturnedOrders.csv"
329
            returned_orders_file = "/tmp/RedExpress_ReturnedOrders.csv"
330
            print "Some of our Orders were returned by logistics provider. Printing report to:" + returned_orders_file
330
            print "Some of our Orders were returned by logistics provider. Printing report to:" + returned_orders_file
331
            print_rto_orders_report(returned_orders_file, returned_orders)
331
            print_rto_orders_report(returned_orders_file, returned_orders)
332
            returned_orders_report = [get_attachment_part(returned_orders_file)]
332
            returned_orders_report = [get_attachment_part(returned_orders_file)]
333
            mail(from_user, from_pwd, to,\
333
            mail(from_user, from_pwd, to,\
334
                 "Returned Orders Report for " + provider.name,\
334
                 "Returned Orders Report for " + provider.name,\
Line 347... Line 347...
347
    
347
    
348
    try:
348
    try:
349
        if orders_not_delivered:
349
        if orders_not_delivered:
350
            print "Undelivered Orders:"
350
            print "Undelivered Orders:"
351
            print orders_not_delivered
351
            print orders_not_delivered
352
            mismatch_file = "/tmp/BlueDart_UndeliveredOrders.csv"
352
            mismatch_file = "/tmp/RedExpress_UndeliveredOrders.csv"
353
            print "Some of our Orders were not delivered. Printing report to:" + mismatch_file
353
            print "Some of our Orders were not delivered. Printing report to:" + mismatch_file
354
            print_undelivered_orders_report(mismatch_file, orders_not_delivered)
354
            print_undelivered_orders_report(mismatch_file, orders_not_delivered)
355
            pickup_mismatch_part = [get_attachment_part(mismatch_file)]
355
            pickup_mismatch_part = [get_attachment_part(mismatch_file)]
356
            mail(from_user, from_pwd, to,\
356
            mail(from_user, from_pwd, to,\
357
                 "Orders that are undelivered but picked up or shipped four days ago for " + provider.name,\
357
                 "Orders that are undelivered but picked up or shipped four days ago for " + provider.name,\