diff --git a/brmbar3/import/import-items.pl b/brmbar3/import/import-items.pl new file mode 100644 index 0000000..d0181a9 --- /dev/null +++ b/brmbar3/import/import-items.pl @@ -0,0 +1,15 @@ +# stdin in format: 8594002931643;Brmburky - hov.na cibul;-15 +use v5.12; +while (<>) { + chomp; + say STDERR "--- $_"; + my ($barcode, $name, $price) = split(/;/); + $price = -$price; + print </dev/null || echo -n 0`; + my $side = 'credit'; + if ($balance < 0) { + $balance = -$balance; + $side = 'debit'; + } + print <