Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2b89ec97

Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt

  • ID 2b89ec9756dc1d3525b6163fe4cf4f38af83f9d8
  • Vorgänger ebef09a8
  • Nachfolger 4498437e

Historie eingefügt

Unterschiede anzeigen:

bin/mozilla/is.pl
77 77
sub edit {
78 78
  $lxdebug->enter_sub();
79 79

  
80

  
80
  # show history button
81
  $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
82
  #/show hhistory button
83
  
81 84
  if ($myconfig{acs} =~ "AR--Add Sales Invoice" || $myconfig{acs} =~ "AR--AR")
82 85
  {
83 86
    $form->error("Access Denied");
......
574 577
    $form->write_trigger(\%myconfig, 2,
575 578
                         "orddate", "BL", "trigger_orddate",
576 579
                         "quodate", "BL", "trigger_quodate");
577

  
580
  # show history button js
581
  $form->{javascript} .= qq|<script type="text/javascript" src="js/show_history.js"></script>|;
582
  #/show history button js
578 583
  $form->header;
579 584

  
580 585
  print qq|
......
1147 1152
    }
1148 1153
  }
1149 1154

  
1155
  # button for saving history
1156
  if($form->{id} ne "") {
1157
    print qq|
1158
  	  <input type=button class=submit onclick=set_history_window(|
1159
  	  . $form->{id} 
1160
  	  . qq|); name=history id=history value=|
1161
  	  . $locale->text('history') 
1162
  	  . qq|>|;
1163
  }
1164
  # /button for saving history
1165

  
1166

  
1150 1167
  print $form->write_trigger(\%myconfig, scalar(@triggers) / 3, @triggers) .
1151 1168
    qq|
1152 1169

  
......
1331 1348
  }
1332 1349
  $lxdebug->leave_sub();
1333 1350
}
1351

  
1334 1352
sub post_payment {
1335 1353
  $lxdebug->enter_sub();
1336 1354
  for $i (1 .. $form->{paidaccounts}) {
......
1425 1443
    if (!(IS->post_invoice(\%myconfig, \%$form))) {
1426 1444
      $form->error($locale->text('Cannot post invoice!'));
1427 1445
    }
1446
    # saving the history
1447
  	if(!exists $form->{addition}) {
1448
  	  $form->{addition} = "PRINTED AND POSTED";
1449
  	  $form->save_history($form->dbconnect(\%myconfig));
1450
    }
1451
    # /saving the history
1452
    
1428 1453
  } else {
1429
    $form->redirect(
1430
            $form->{label} . " $form->{invnumber} " . $locale->text('posted!'))
1431
      if (IS->post_invoice(\%myconfig, \%$form));
1454
      if (IS->post_invoice(\%myconfig, \%$form)){
1455
    	# saving the history
1456
  		if(!exists $form->{addition}) {
1457
  	  		if($form->{storno}) {
1458
  	  			$form->{addition} = "STORNO";
1459
  	  		}
1460
  	  		else {
1461
  	  			$form->{addition} = "POSTED";
1462
  	  		}
1463
  	  		$form->save_history($form->dbconnect(\%myconfig));
1464
    	}
1465
    	# /saving the history
1466
    
1467
    	$form->redirect(
1468
            $form->{label} . " $form->{invnumber} " . $locale->text('posted!'));
1469
  	}
1432 1470
    $form->error($locale->text('Cannot post invoice!'));
1433 1471
  }
1434 1472

  
......
1584 1622

  
1585 1623
sub yes {
1586 1624
  $lxdebug->enter_sub();
1587

  
1588
  $form->redirect($locale->text('Invoice deleted!'))
1589
    if (IS->delete_invoice(\%myconfig, \%$form, $spool));
1625
  if (IS->delete_invoice(\%myconfig, \%$form, $spool)) {
1626
    # saving the history
1627
  	if(!exists $form->{addition}) {
1628
  	  $form->{addition} = "DELETED";
1629
  	  $form->save_history($form->dbconnect(\%myconfig));
1630
    }
1631
    # /saving the history 
1632
    $form->redirect($locale->text('Invoice deleted!')); 
1633
  }
1590 1634
  $form->error($locale->text('Cannot delete invoice!'));
1591 1635

  
1592 1636
  $lxdebug->leave_sub();

Auch abrufbar als: Unified diff