Subversion Repositories SmartDukaan

Rev

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

Rev 4607 Rev 4608
Line 655... Line 655...
655
            print sys.exc_info()[0]
655
            print sys.exc_info()[0]
656
            print e.message
656
            print e.message
657
 
657
 
658
        order.vendorId = vendorId
658
        order.vendorId = vendorId
659
        lineitems = order.lineitems
659
        lineitems = order.lineitems
660
        for lineitem in lineitems:
-
 
661
            catalog_client.reduceReservationCount(item_id, order.warehouse_id, lineitem.quantity)
-
 
662
 
660
 
663
        # Putting NULL as transfer price for cases where its missing
661
        # Putting NULL as transfer price for cases where its missing
664
        if item_pricing is not None:
662
        if item_pricing is not None:
665
            order.lineitems[0].transfer_price = item_pricing.transferPrice
663
            order.lineitems[0].transfer_price = item_pricing.transferPrice
666
 
664
 
Line 682... Line 680...
682
                print sys.exc_info()[0]
680
                print sys.exc_info()[0]
683
                print 'Could not scan out orders due to: ' + e.message
681
                print 'Could not scan out orders due to: ' + e.message
684
                if e.exceptionType == ExceptionType.ILLEGAL_ARGUMENTS:
682
                if e.exceptionType == ExceptionType.ILLEGAL_ARGUMENTS:
685
                    raise TransactionServiceException(110, e.message)
683
                    raise TransactionServiceException(110, e.message)
686
 
684
 
-
 
685
        try:
-
 
686
            catalog_client = CatalogClient().get_client()
-
 
687
            for lineitem in lineitems:
-
 
688
                catalog_client.reduceReservationCount(item_id, order.warehouse_id, lineitem.quantity)
-
 
689
        except Exception as e:
-
 
690
            print sys.exc_info()[0]
-
 
691
            print e.message
-
 
692
            raise TransactionServiceException(110, 'Please contact with Engg. team, inventory could not be updated because of: ' + e.message)
-
 
693
 
687
        session.commit()
694
        session.commit()
688
        return True
695
        return True
689
    else:
696
    else:
690
        return False
697
        return False
691
 
698