[BACK]Return to pta_import.pl CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / pta

Diff for /pta/pta_import.pl between version 1.1 and 1.2

version 1.1, 2020/10/31 01:02:57 version 1.2, 2020/11/01 20:12:08
Line 57  sub import_chase_credit_card() {
Line 57  sub import_chase_credit_card() {
             'Professional Services' => 'PRO',              'Professional Services' => 'PRO',
             'Shopping' => 'SHOP'              'Shopping' => 'SHOP'
         );          );
         while (<CSV>) {          while (<>) {
                 chomp;                  chomp;
                 my ($trans_date, $post_date, $description, $category,                  my ($trans_date, $post_date, $description, $category,
                     $type, $amount) = split /,/;                      $type, $amount) = split /,/;
Line 88  my $chase_credit_card_header = "Transaction Date,Post 
Line 88  my $chase_credit_card_header = "Transaction Date,Post 
     "Description,Category,Type,Amount";      "Description,Category,Type,Amount";
 my $firstLine;  my $firstLine;
   
 open CSV, '<', $ARGV[0];  chomp($firstLine = <>);
 chomp($firstLine = <CSV>);  
 if ($firstLine eq $chase_credit_card_header) {  if ($firstLine eq $chase_credit_card_header) {
         import_chase_credit_card;          import_chase_credit_card;
 } else {  } else {
         print "Undefined bank header\n";          print "Undefined bank header\n";
 }  }
 close CSV;  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

CVSweb