Subversion Repositories SmartDukaan

Rev

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

Rev 37828 Rev 37832
Line 433... Line 433...
433
            }
433
            }
434
            movementBillingTask.billMovements(poNumbers, args.getOptionValues("email").get(0),
434
            movementBillingTask.billMovements(poNumbers, args.getOptionValues("email").get(0),
435
                    Integer.parseInt(args.getOptionValues("provider").get(0)), args.containsOption("live"));
435
                    Integer.parseInt(args.getOptionValues("provider").get(0)), args.containsOption("live"));
436
            System.exit(0);
436
            System.exit(0);
437
        }
437
        }
-
 
438
        if (args.containsOption("closeMovementPO")) {
-
 
439
            if (!args.containsOption("pos") || !args.containsOption("email")) {
-
 
440
                LOGGER.error("closeMovementPO needs --pos=PO1,PO2 and --email=<closed by>; add --live to close"
-
 
441
                        + " (default is a dry run)");
-
 
442
                System.exit(1);
-
 
443
            }
-
 
444
            List<String> poNumbers = new ArrayList<>();
-
 
445
            for (String value : args.getOptionValues("pos")) {
-
 
446
                for (String poNumber : value.split(",")) {
-
 
447
                    if (!poNumber.trim().isEmpty()) {
-
 
448
                        poNumbers.add(poNumber.trim());
-
 
449
                    }
-
 
450
                }
-
 
451
            }
-
 
452
            movementPoTask.closeMovementPos(poNumbers, args.getOptionValues("email").get(0), args.containsOption("live"));
-
 
453
            System.exit(0);
-
 
454
        }
438
        if (args.containsOption("autoCreateMovementPO")) {
455
        if (args.containsOption("autoCreateMovementPO")) {
439
            if (!args.containsOption("file") || !args.containsOption("warehouse") || !args.containsOption("supplier")
456
            if (!args.containsOption("file") || !args.containsOption("warehouse") || !args.containsOption("supplier")
440
                    || !args.containsOption("email")) {
457
                    || !args.containsOption("email")) {
441
                LOGGER.error("autoCreateMovementPO needs --file=<xlsx>, --warehouse=<destination>, --supplier=<internal"
458
                LOGGER.error("autoCreateMovementPO needs --file=<xlsx>, --warehouse=<destination>, --supplier=<internal"
442
                        + " supplier> and --email=<operator>; add --live to raise (default is a dry run), --bill"
459
                        + " supplier> and --email=<operator>; add --live to raise (default is a dry run), --bill"