| Line 26... |
Line 26... |
| 26 |
print ' getAllPurchaseOrders(POStatus status)'
|
26 |
print ' getAllPurchaseOrders(POStatus status)'
|
| 27 |
print ' Supplier getSupplier(i64 id)'
|
27 |
print ' Supplier getSupplier(i64 id)'
|
| 28 |
print ' i64 startPurchase(i64 purchaseOrderId, string invoiceNumber, double freightCharges)'
|
28 |
print ' i64 startPurchase(i64 purchaseOrderId, string invoiceNumber, double freightCharges)'
|
| 29 |
print ' i64 closePurchase(i64 purchaseId)'
|
29 |
print ' i64 closePurchase(i64 purchaseId)'
|
| 30 |
print ' getAllPurchases(i64 purchaseOrderId, bool open)'
|
30 |
print ' getAllPurchases(i64 purchaseOrderId, bool open)'
|
| - |
|
31 |
print ' getPurchasesForPO(i64 purchaseOrderId)'
|
| 31 |
print ' PurchaseOrder getPurchaseOrderForPurchase(i64 purchaseId)'
|
32 |
print ' PurchaseOrder getPurchaseOrderForPurchase(i64 purchaseId)'
|
| 32 |
print ' getPendingPurchaseOrders(i64 warehouseId)'
|
33 |
print ' getPendingPurchaseOrders(i64 warehouseId)'
|
| 33 |
print ' getSuppliers()'
|
34 |
print ' getSuppliers()'
|
| 34 |
print ' void fulfillPO(i64 purchaseOrderId, i64 itemId, i64 quantity)'
|
35 |
print ' void fulfillPO(i64 purchaseOrderId, i64 itemId, i64 quantity)'
|
| 35 |
print ' void updatePurchaseOrder(PurchaseOrder purchaseOrder)'
|
36 |
print ' void updatePurchaseOrder(PurchaseOrder purchaseOrder)'
|
| 36 |
print ' void unFulfillPO(i64 purchaseId, i64 itemId, i64 quantity)'
|
37 |
print ' void unFulfillPO(i64 purchaseId, i64 itemId, i64 quantity)'
|
| 37 |
print ' getInvoices(i64 date)'
|
38 |
print ' getInvoices(i64 date)'
|
| 38 |
print ' void createInvoice(Invoice invoice)'
|
39 |
print ' void createInvoice(Invoice invoice)'
|
| 39 |
print ' Supplier addSupplier(Supplier supplier)'
|
40 |
print ' Supplier addSupplier(Supplier supplier)'
|
| 40 |
print ' void updateSupplier(Supplier supplier)'
|
41 |
print ' void updateSupplier(Supplier supplier)'
|
| - |
|
42 |
print ' i64 createPurchaseReturn(PurchaseReturn purchaseReturn)'
|
| - |
|
43 |
print ' void settlePurchaseReturn(i64 id)'
|
| - |
|
44 |
print ' getUnsettledPurchaseReturns()'
|
| - |
|
45 |
print ' getInvoice(string invoiceNumber, i64 supplierId)'
|
| - |
|
46 |
print ' i64 createPurchaseForOurExtBilling(string invoiceNumber, double unitPrice, i64 itemId)'
|
| - |
|
47 |
print ' void fulfillPOForExtBilling(i64 itemId, i64 quantity)'
|
| 41 |
print ''
|
48 |
print ''
|
| 42 |
sys.exit(0)
|
49 |
sys.exit(0)
|
| 43 |
|
50 |
|
| 44 |
pp = pprint.PrettyPrinter(indent = 2)
|
51 |
pp = pprint.PrettyPrinter(indent = 2)
|
| 45 |
host = 'localhost'
|
52 |
host = 'localhost'
|
| Line 128... |
Line 135... |
| 128 |
if len(args) != 2:
|
135 |
if len(args) != 2:
|
| 129 |
print 'getAllPurchases requires 2 args'
|
136 |
print 'getAllPurchases requires 2 args'
|
| 130 |
sys.exit(1)
|
137 |
sys.exit(1)
|
| 131 |
pp.pprint(client.getAllPurchases(eval(args[0]),eval(args[1]),))
|
138 |
pp.pprint(client.getAllPurchases(eval(args[0]),eval(args[1]),))
|
| 132 |
|
139 |
|
| - |
|
140 |
elif cmd == 'getPurchasesForPO':
|
| - |
|
141 |
if len(args) != 1:
|
| - |
|
142 |
print 'getPurchasesForPO requires 1 args'
|
| - |
|
143 |
sys.exit(1)
|
| - |
|
144 |
pp.pprint(client.getPurchasesForPO(eval(args[0]),))
|
| - |
|
145 |
|
| 133 |
elif cmd == 'getPurchaseOrderForPurchase':
|
146 |
elif cmd == 'getPurchaseOrderForPurchase':
|
| 134 |
if len(args) != 1:
|
147 |
if len(args) != 1:
|
| 135 |
print 'getPurchaseOrderForPurchase requires 1 args'
|
148 |
print 'getPurchaseOrderForPurchase requires 1 args'
|
| 136 |
sys.exit(1)
|
149 |
sys.exit(1)
|
| 137 |
pp.pprint(client.getPurchaseOrderForPurchase(eval(args[0]),))
|
150 |
pp.pprint(client.getPurchaseOrderForPurchase(eval(args[0]),))
|
| Line 188... |
Line 201... |
| 188 |
if len(args) != 1:
|
201 |
if len(args) != 1:
|
| 189 |
print 'updateSupplier requires 1 args'
|
202 |
print 'updateSupplier requires 1 args'
|
| 190 |
sys.exit(1)
|
203 |
sys.exit(1)
|
| 191 |
pp.pprint(client.updateSupplier(eval(args[0]),))
|
204 |
pp.pprint(client.updateSupplier(eval(args[0]),))
|
| 192 |
|
205 |
|
| - |
|
206 |
elif cmd == 'createPurchaseReturn':
|
| - |
|
207 |
if len(args) != 1:
|
| - |
|
208 |
print 'createPurchaseReturn requires 1 args'
|
| - |
|
209 |
sys.exit(1)
|
| - |
|
210 |
pp.pprint(client.createPurchaseReturn(eval(args[0]),))
|
| - |
|
211 |
|
| - |
|
212 |
elif cmd == 'settlePurchaseReturn':
|
| - |
|
213 |
if len(args) != 1:
|
| - |
|
214 |
print 'settlePurchaseReturn requires 1 args'
|
| - |
|
215 |
sys.exit(1)
|
| - |
|
216 |
pp.pprint(client.settlePurchaseReturn(eval(args[0]),))
|
| - |
|
217 |
|
| - |
|
218 |
elif cmd == 'getUnsettledPurchaseReturns':
|
| - |
|
219 |
if len(args) != 0:
|
| - |
|
220 |
print 'getUnsettledPurchaseReturns requires 0 args'
|
| - |
|
221 |
sys.exit(1)
|
| - |
|
222 |
pp.pprint(client.getUnsettledPurchaseReturns())
|
| - |
|
223 |
|
| - |
|
224 |
elif cmd == 'getInvoice':
|
| - |
|
225 |
if len(args) != 2:
|
| - |
|
226 |
print 'getInvoice requires 2 args'
|
| - |
|
227 |
sys.exit(1)
|
| - |
|
228 |
pp.pprint(client.getInvoice(args[0],eval(args[1]),))
|
| - |
|
229 |
|
| - |
|
230 |
elif cmd == 'createPurchaseForOurExtBilling':
|
| - |
|
231 |
if len(args) != 3:
|
| - |
|
232 |
print 'createPurchaseForOurExtBilling requires 3 args'
|
| - |
|
233 |
sys.exit(1)
|
| - |
|
234 |
pp.pprint(client.createPurchaseForOurExtBilling(args[0],eval(args[1]),eval(args[2]),))
|
| - |
|
235 |
|
| - |
|
236 |
elif cmd == 'fulfillPOForExtBilling':
|
| - |
|
237 |
if len(args) != 2:
|
| - |
|
238 |
print 'fulfillPOForExtBilling requires 2 args'
|
| - |
|
239 |
sys.exit(1)
|
| - |
|
240 |
pp.pprint(client.fulfillPOForExtBilling(eval(args[0]),eval(args[1]),))
|
| - |
|
241 |
|
| 193 |
else:
|
242 |
else:
|
| 194 |
print 'Unrecognized method %s' % cmd
|
243 |
print 'Unrecognized method %s' % cmd
|
| 195 |
sys.exit(1)
|
244 |
sys.exit(1)
|
| 196 |
|
245 |
|
| 197 |
transport.close()
|
246 |
transport.close()
|