Subversion Repositories SmartDukaan

Rev

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

Rev 4885 Rev 4887
Line 679... Line 679...
679
                        lineItemString = " ".join([str(lineitem.brand), str(lineitem.model_name), str(lineitem.model_number), str(lineitem.color)])
679
                        lineItemString = " ".join([str(lineitem.brand), str(lineitem.model_name), str(lineitem.model_number), str(lineitem.color)])
680
                        raise TransactionServiceException(110, 'Trying to scan ' + scanItemString + ' instead of ' + lineItemString)
680
                        raise TransactionServiceException(110, 'Trying to scan ' + scanItemString + ' instead of ' + lineItemString)
681
                    inventoryItem = warehouse_client.scanSerializedItemForOrder(serialNumber, ScanType.SALE, orderId, order.warehouse_id)
681
                    inventoryItem = warehouse_client.scanSerializedItemForOrder(serialNumber, ScanType.SALE, orderId, order.warehouse_id)
682
                    lineitem.transfer_price = inventoryItem.unitPrice
682
                    lineitem.transfer_price = inventoryItem.unitPrice
683
                    order.vendorId = inventoryItem.supplierId
683
                    order.vendorId = inventoryItem.supplierId
-
 
684
                    catalog_client = CatalogClient().get_client()
-
 
685
                    for lineitem in lineitems:
-
 
686
                        catalog_client.addInventory(item_id, order.warehouse_id, -1 * lineitem.quantity)
684
                except WarehouseServiceException as e:
687
                except WarehouseServiceException as e:
685
                    print sys.exc_info()[0]
688
                    print sys.exc_info()[0]
686
                    print 'Could not scan out orders due to: ' + e.message
689
                    print 'Could not scan out orders due to: ' + e.message
687
                    if e.exceptionType == ExceptionType.ILLEGAL_ARGUMENTS:
690
                    if e.exceptionType == ExceptionType.ILLEGAL_ARGUMENTS:
688
                        raise TransactionServiceException(110, e.message)
691
                        raise TransactionServiceException(110, e.message)