Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8f98fc19

Von Philip Reetz vor fast 18 Jahren hinzugefügt

  • ID 8f98fc19d76ab2d20022b3103ac22618bbde5656
  • Vorgänger 88583bb3
  • Nachfolger 7743b3ab

Bei hoeheren Mahnstufen wurde die Rechnung mehrmals angezeigt. In der Uebersicht der Mahnungen
hat ein Klick auf die Rechnungsnummer nicht die Rechnungsmaske geoeffnet

Unterschiede anzeigen:

SL/DN.pm
138 138
    $dbh->do($query) || $form->dberror($query);
139 139
  }
140 140

  
141
  my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id) where ar.id IN $form->{inv_ids}|;
141
  my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id AND dunning_config.dunning_level=da.dunning_level) where ar.id IN $form->{inv_ids}|;
142 142
  my $sth = $dbh->prepare($query);
143 143
  $sth->execute || $form->dberror($query);
144 144
  my $first = 1;
......
278 278
	         FROM dunning_config dnn, ar a
279 279
	         JOIN customer ct ON (a.customer_id = ct.id)
280 280
		 LEFT JOIN dunning_config dn ON (dn.id = a.dunning_id)
281
                 LEFT JOIN dunning da ON (da.trans_id=a.id)
281
                 LEFT JOIN dunning da ON (da.trans_id=a.id AND dunning_config.dunning_level=da.dunning_level)
282 282
                 $where|;
283 283

  
284 284
  my $sth = $dbh->prepare($query);
......
359 359
  $where .= " ORDER by $sortorder";
360 360

  
361 361

  
362
  $query = qq|SELECT a.id, a.ordnumber, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.duedate,da.fee ,da.interest, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate, da.dunning_id
362
  $query = qq|SELECT a.id, a.ordnumber,a.invoice, a.transdate, a.invnumber,a.amount, ct.name AS customername, a.duedate,da.fee ,da.interest, dn.dunning_description, da.transdate AS dunning_date, da.duedate AS dunning_duedate, da.dunning_id
363 363
	         FROM ar a
364 364
	         JOIN customer ct ON (a.customer_id = ct.id),
365 365
                 dunning da LEFT JOIN dunning_config dn ON (da.dunning_id=dn.id)
......
502 502
  my $dbh = $form->dbconnect_noauto($myconfig);
503 503

  
504 504

  
505
  my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id) where ar.dunning_id=$dunning_id|;
505
  my $query = qq| SELECT invnumber, ordnumber, customer_id, amount, netamount, ar.transdate, ar.duedate, paid, amount-paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, da.duedate AS dunning_duedate FROM ar LEFT JOIN dunning_config ON (dunning_config.id=ar.dunning_id) LEFT JOIN dunning da ON (ar.id=da.trans_id AND dunning_config.dunning_level=da.dunning_level) where ar.dunning_id=$dunning_id|;
506 506
  my $sth = $dbh->prepare($query);
507 507
  $sth->execute || $form->dberror($query);
508 508
  my $first = 1;
bin/mozilla/dn.pl
896 896
  
897 897

  
898 898
  $dunning = qq|<select name=next_dunning_id_$i>$form->{selectdunning}</select>|;
899

  
900

  
899
    my $script = "";
900
    if ($ref->{invoice}) {
901
      $script = "is.pl";
902
    } else {
903
      $script = "ar.pl";
904
    }
901 905
    $column_data{dunning_description}           = qq|<td><a href=dn.pl?action=print_dunning&dunning_id=$ref->{dunning_id}&format=pdf&media=screen&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$form->{callback}>$ref->{dunning_description}</a></td>|;
902 906
    my $active = "checked";
903 907
    $column_data{dunning_date}           = qq|<td>$ref->{dunning_date}</td>|;
......
905 909

  
906 910
    $column_data{inv_duedate}           = qq|<td>$ref->{duedate}</td>|;
907 911
    $column_data{invdate}           = qq|<td>$ref->{transdate}</td>|;
908
    $column_data{invnumber}           = qq|<td><a href=ar.pl?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$form->{callback}>$ref->{invnumber}</a></td>|;
912
    $column_data{invnumber}           = qq|<td><a href=$script?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$form->{callback}>$ref->{invnumber}</a></td>|;
909 913
    $column_data{customername}           = qq|<td>$ref->{customername}</td>|;
910 914
    $column_data{invamount}           = qq|<td>$ref->{amount}</td>|;
911 915
    $column_data{fee}           = qq|<td>$ref->{fee}</td>|;

Auch abrufbar als: Unified diff