Subversion Repositories SmartDukaan

Rev

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

Rev 2821 Rev 2832
Line 21... Line 21...
21
  print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
21
  print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
22
  print ''
22
  print ''
23
  print 'Functions:'
23
  print 'Functions:'
24
  print '  i64 createPurchaseOrder(PurchaseOrder purchaseOrder)'
24
  print '  i64 createPurchaseOrder(PurchaseOrder purchaseOrder)'
25
  print '  PurchaseOrder getPurchaseOrder(i64 id)'
25
  print '  PurchaseOrder getPurchaseOrder(i64 id)'
-
 
26
  print '  Supplier getSupplier(i64 id)'
26
  print '  i64 startPurchase(i64 purchaseOrderId, string invoiceNumber, double freightCharges)'
27
  print '  i64 startPurchase(i64 purchaseOrderId, string invoiceNumber, double freightCharges)'
27
  print '  i64 closePurchase(i64 purchaseId)'
28
  print '  i64 closePurchase(i64 purchaseId)'
28
  print '  void scanIn(i64 purchaseId, i64 itemId, string itemNumber, string imeiNumber, ScanType type)'
29
  print '  void scanIn(i64 purchaseId, i64 itemId, string itemNumber, string imeiNumber, ScanType type)'
29
  print '  void scanOut(i64 itemNumber, i64 imeiNumber, ScanType type)'
30
  print '  void scanOut(i64 itemNumber, i64 imeiNumber, ScanType type)'
30
  print ''
31
  print ''
Line 85... Line 86...
85
  if len(args) != 1:
86
  if len(args) != 1:
86
    print 'getPurchaseOrder requires 1 args'
87
    print 'getPurchaseOrder requires 1 args'
87
    sys.exit(1)
88
    sys.exit(1)
88
  pp.pprint(client.getPurchaseOrder(eval(args[0]),))
89
  pp.pprint(client.getPurchaseOrder(eval(args[0]),))
89
 
90
 
-
 
91
elif cmd == 'getSupplier':
-
 
92
  if len(args) != 1:
-
 
93
    print 'getSupplier requires 1 args'
-
 
94
    sys.exit(1)
-
 
95
  pp.pprint(client.getSupplier(eval(args[0]),))
-
 
96
 
90
elif cmd == 'startPurchase':
97
elif cmd == 'startPurchase':
91
  if len(args) != 3:
98
  if len(args) != 3:
92
    print 'startPurchase requires 3 args'
99
    print 'startPurchase requires 3 args'
93
    sys.exit(1)
100
    sys.exit(1)
94
  pp.pprint(client.startPurchase(eval(args[0]),args[1],eval(args[2]),))
101
  pp.pprint(client.startPurchase(eval(args[0]),args[1],eval(args[2]),))