Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fb4d2ffa

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID fb4d2ffa6aae03b36e4db77be10c3d9dce4413f8
  • Vorgänger d7f06042
  • Nachfolger fc490063

Bei Einkaufs-/Verkaufsmasken sowie bei Debitoren- und Kreditorenbuchungen wird ein Button angezeigt, der ein Popupfenster öffnet, das zum ausgewählten Kunden/Lieferanten alle Stammdaten inklusive Ansprechpartner und Lieferadressen anzeigt.

Unterschiede anzeigen:

bin/mozilla/is.pl
83 83
  # show history button
84 84
  $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
85 85
  #/show hhistory button
86
  
86

  
87 87
  if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR")
88 88
  {
89 89
    $form->error("Access Denied");
......
288 288

  
289 289
    if ($form->{type} eq "credit_note") {
290 290
      $form->{title} = $locale->text('Edit Credit Note');
291
    
291

  
292 292
      if ($form->{storno}) {
293 293
        $form->{title} = $locale->text('Edit Storno Credit Note');
294 294
      }
295 295
    } else {
296 296
      $form->{title} = $locale->text('Edit Sales Invoice');
297
    
297

  
298 298
      if ($form->{storno}) {
299 299
        $form->{title} = $locale->text('Edit Storno Invoice');
300 300
      }
......
379 379

  
380 380
  my $customers = qq|
381 381
      <th align="right">| . $locale->text('Customer') . qq|</th>
382
      <td>| . 
383
        (($myconfig{vclimit} <=  scalar(@values)) 
384
              ? qq|<input type="text" value="| . H($form->{"oldcustomer"}) . qq|" name="customer">| 
385
              : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, 
382
      <td>| .
383
        (($myconfig{vclimit} <=  scalar(@values))
384
              ? qq|<input type="text" value="| . H($form->{"oldcustomer"}) . qq|" name="customer">|
385
              : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer},
386 386
                             '-onChange' => 'document.getElementById(\'update_button\').click();',
387 387
                             '-values' => \@values, '-labels' => \%labels)))) . qq|
388
        <input type="button" value="?" onclick="show_vc_details('customer')">
388 389
      </td>|;
389
    
390

  
390 391
  %labels = ();
391 392
  @values = ("");
392 393
  foreach my $item (@{ $form->{"ALL_SHIPTO"} }) {
......
412 413
    push(@values, $item);
413 414
    $labels{$item} = $item;
414 415
  }
415
  
416

  
416 417
  $form->{currency}        = $form->{defaultcurrency} unless $form->{currency};
417 418
  my $currencies;
418 419
  if (scalar @values) {
......
493 494

  
494 495
  #substitute \n and \r to \s (bug 543)
495 496
  $form->{selectcustomer} =~ s/[\n\r]/&nbsp;/g;
496
  
497

  
497 498
  if (($form->{creditlimit} != 0) && ($form->{creditremaining} < 0) && !$form->{update}) {
498 499
    $creditwarning = 1;
499 500
  } else {
......
623 624
  }
624 625

  
625 626
  $form->{"javascript"} .= qq|<script type="text/javascript" src="js/show_form_details.js"></script>|;
627
  $form->{javascript}   .= qq|<script type="text/javascript" src="js/show_vc_details.js"></script>|;
626 628

  
627 629
  $jsscript .=
628 630
    $form->write_trigger(\%myconfig, 2,
......
642 644

  
643 645
<form method="post" name="invoice" action="$form->{script}">
644 646
| ;
645
map({print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} 
646
     qw(id action type media format queued printed emailed title vc discount 
647
map({print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});}
648
     qw(id action type media format queued printed emailed title vc discount
647 649
        creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id)) ;
648 650
print ($form->{saved_message} ? qq|<p>$form->{saved_message}</p>| : "") ;
649 651
print qq|
......
787 789
    <td>
788 790
    </td>
789 791
  </tr>
790
| . 
792
| .
791 793
$jsscript
792 794
. qq|
793 795
<!-- shipto are in hidden variables -->
794 796
| ;
795
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } 
797
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
796 798
       qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry  shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2));
797 799
print qq|<!-- email variables --> |;
798
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } 
800
map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
799 801
    qw(message email subject cc bcc taxaccounts));
800 802
print qq|<input type="hidden" name="webdav" value="| . $webdav . qq|">|;
801 803

  
802 804
  foreach $item (split(/ /, $form->{taxaccounts})) {
803
    map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } 
805
    map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); }
804 806
    ("${item}_rate", "${item}_description", "${item}_taxnumber"));
805 807
  }
806 808
  $lxdebug->leave_sub();
......
822 824
    qq|<textarea name="notes" rows="$rows" cols="26" wrap="soft">$form->{notes}</textarea>|;
823 825
  $intnotes =
824 826
    qq|<textarea name="intnotes" rows="$rows" cols="35" wrap="soft">$form->{intnotes}</textarea>|;
825
 
827

  
826 828
  $form->{taxincluded} = ($form->{taxincluded} ? "checked" : "");
827 829

  
828 830
  $taxincluded = "";
......
1061 1063
    push(@triggers, "datepaid_$i", "BL", "trigger_datepaid_$i");
1062 1064
  }
1063 1065

  
1064
  map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal)); 
1066
  map({ print($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } qw(paidaccounts selectAR_paid oldinvtotal));
1065 1067
  print qq|<input type="hidden" name="oldtotalpaid" value="$totalpaid">
1066 1068
    </table>
1067 1069
    </td>
......
1161 1163

  
1162 1164
<input type="hidden" name="rowcount" value="$form->{rowcount}">
1163 1165
| .
1164
$cgi->hidden("-name" => "callback", "-value" => $form->{callback}) 
1166
$cgi->hidden("-name" => "callback", "-value" => $form->{callback})
1165 1167
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
1166 1168
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]);
1167 1169
map({ print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} qw(login password));
......
1185 1187
    $form->{print_and_post} = 0;
1186 1188
  }
1187 1189

  
1188
  
1190

  
1189 1191
  if($form->{taxincluded}) {
1190 1192
    $taxincluded = "checked";
1191 1193
  }
......
1454 1456
                                          "POSTED";
1455 1457
    $form->save_history($form->dbconnect(\%myconfig));
1456 1458
  }
1457
  
1459

  
1458 1460
  $form->redirect( $form->{label} . " $form->{invnumber} " . $locale->text('posted!'))
1459 1461
    unless $print_post;
1460 1462

  
......
1586 1588
  $form->{script} = 'is.pl';
1587 1589
  $script         = "is";
1588 1590
  $buysell        = 'buy';
1589
  
1591

  
1590 1592

  
1591 1593
  # bo creates the id, reset it
1592 1594
  map { delete $form->{$_} }
......
1629 1631
  if (IS->delete_invoice(\%myconfig, \%$form, $spool)) {
1630 1632
    # saving the history
1631 1633
  	if(!exists $form->{addition}) {
1632
    $form->{snumbers} = qq|invnumber_| . $form->{invnumber}; 
1634
    $form->{snumbers} = qq|invnumber_| . $form->{invnumber};
1633 1635
  	  $form->{addition} = "DELETED";
1634 1636
  	  $form->save_history($form->dbconnect(\%myconfig));
1635 1637
    }
1636
    # /saving the history 
1637
    $form->redirect($locale->text('Invoice deleted!')); 
1638
    # /saving the history
1639
    $form->redirect($locale->text('Invoice deleted!'));
1638 1640
  }
1639 1641
  $form->error($locale->text('Cannot delete invoice!'));
1640 1642

  

Auch abrufbar als: Unified diff