Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dacb62eb

Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt

  • ID dacb62eb0109209f6c56d25d84c252c506fa25d1
  • Vorgänger 590f737f
  • Nachfolger ebef09a8

Historie eingefügt

Unterschiede anzeigen:

bin/mozilla/ap.pl
88 88

  
89 89
sub edit {
90 90
  $lxdebug->enter_sub();
91
  # show history button
92
  $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
93
  #/show hhistory button
91 94

  
92 95
  $form->{title} = "Edit";
93 96

  
......
788 791
      <input class=submit type=submit name=action value="|
789 792
      . $locale->text('Post') . qq|">|;
790 793
  }
791

  
794
  # button for saving history
795
  if($form->{id} ne "") {
796
    print qq|
797
  	  <input type=button class=submit onclick=set_history_window(|
798
  	  . $form->{id} 
799
  	  . qq|); name=history id=history value=|
800
  	  . $locale->text('history') 
801
  	  . qq|>|;
802
  }
803
  # /button for saving history
792 804
  print "
793 805
</form>
794 806

  
......
988 1000
  $form->{taxkey}       = $taxkey;
989 1001

  
990 1002
  $form->{id} = 0 if $form->{postasnew};
1003
  # saving the history
1004
  if(!exists $form->{addition} && $form->{id} ne "") {
1005
  	$form->{addition} = "POSTED";
1006
  	$form->save_history($form->dbconnect(\%myconfig));
1007
  }
1008
  # /saving the history 
991 1009

  
992 1010
  $form->redirect($locale->text('Transaction posted!'))
993 1011
    if (AP->post_transaction(\%myconfig, \%$form));
......
1000 1018
  $lxdebug->enter_sub();
1001 1019

  
1002 1020
  $form->{postasnew} = 1;
1021
  # saving the history
1022
  if(!exists $form->{addition} && $form->{id} ne "") {
1023
  	$form->{addition} = "POSTED AS NEW";
1024
  	$form->save_history($form->dbconnect(\%myconfig));
1025
  }
1026
  # /saving the history 
1003 1027
  &post;
1004 1028

  
1005 1029
  $lxdebug->leave_sub();
......
1057 1081

  
1058 1082
sub yes {
1059 1083
  $lxdebug->enter_sub();
1060

  
1061
  $form->redirect($locale->text('Transaction deleted!'))
1062
    if (AP->delete_transaction(\%myconfig, \%$form, $spool));
1084
  if (AP->delete_transaction(\%myconfig, \%$form, $spool)) {
1085
    # saving the history
1086
    if(!exists $form->{addition}) {
1087
  	  $form->{addition} = "DELETED";
1088
      $form->save_history($form->dbconnect(\%myconfig));
1089
    }
1090
    # /saving the history 
1091
    $form->redirect($locale->text('Transaction deleted!'));
1092
  }
1063 1093
  $form->error($locale->text('Cannot delete transaction!'));
1064 1094

  
1065 1095
  $lxdebug->leave_sub();

Auch abrufbar als: Unified diff