Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8c7e4493

Von Moritz Bunkus vor fast 17 Jahren hinzugefügt

  • ID 8c7e44938a661e035f62840e1e177353240ace5d
  • Vorgänger 3ced230b
  • Nachfolger ce45d060

Umstellung der Benutzerverwaltung von Dateien im Verzeichnis "users" auf die Verwendung einer Authentifizierungsdatenbank.
Es ist erforderlich, die Dateien doc/UPGRADE und doc/INSTALL/index.html zu lesen und die angesprochenen Punkte auszuführen, um nach einem Upgrade weiter arbeiten zu können.

Unterschiede anzeigen:

bin/mozilla/is.pl
48 48
sub add {
49 49
  $lxdebug->enter_sub();
50 50

  
51
  $auth->assert('invoice_edit');
52

  
51 53
  return $lxdebug->leave_sub() if (load_draft_maybe());
52 54

  
53 55
  if ($form->{type} eq "credit_note") {
......
62 64
  }
63 65

  
64 66

  
65
  $form->{callback} =
66
    "$form->{script}?action=add&type=$form->{type}&login=$form->{login}&password=$form->{password}"
67
    unless $form->{callback};
67
  $form->{callback} = "$form->{script}?action=add&type=$form->{type}" unless $form->{callback};
68 68

  
69 69
  $form{jsscript} = "date";
70 70

  
......
82 82
sub edit {
83 83
  $lxdebug->enter_sub();
84 84

  
85
  $auth->assert('invoice_edit');
86

  
85 87
  # show history button
86 88
  $form->{javascript} = qq|<script type="text/javascript" src="js/show_history.js"></script>|;
87 89
  #/show hhistory button
......
112 114
sub invoice_links {
113 115
  $lxdebug->enter_sub();
114 116

  
117
  $auth->assert('invoice_edit');
118

  
115 119
  $form->{vc} = 'customer';
116 120

  
117 121
  # create links
......
231 235
sub prepare_invoice {
232 236
  $lxdebug->enter_sub();
233 237

  
238
  $auth->assert('invoice_edit');
239

  
234 240
  if ($form->{type} eq "credit_note") {
235 241
    $form->{type}     = "credit_note";
236 242
    $form->{formname} = "credit_note";
......
281 287
sub form_header {
282 288
  $lxdebug->enter_sub();
283 289

  
290
  $auth->assert('invoice_edit');
291

  
284 292
  $form->{employee_id} = $form->{old_employee_id} if $form->{old_employee_id};
285 293
  $form->{salesman_id} = $form->{old_salesman_id} if $form->{old_salesman_id};
286 294

  
......
305 313
    }
306 314
  }
307 315

  
308
  my $set_duedate_url = "$form->{script}?login=$form->{login}&password=$form->{password}&action=set_duedate";
316
  my $set_duedate_url = "$form->{script}?action=set_duedate";
309 317

  
310 318
  my $pjx = new CGI::Ajax( 'set_duedate' => $set_duedate_url );
311 319
  push(@ { $form->{AJAX} }, $pjx);
......
549 557
    $button2 = qq|
550 558
      <td width="13"><input name="duedate" id="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\">
551 559
       <input type="button" name="duedate" id="trigger2" value="|
552
      . $locale->text('button') . qq|"></td></td>
560
      . $locale->text('button') . qq|"></td>
553 561
    |;
554 562
    $button3 = qq|
555 563
      <td width="13"><input name="deliverydate" id="deliverydate" size="11" title="$myconfig{dateformat}" value="$form->{deliverydate}" onBlur=\"check_right_date_format(this)\">
556 564
       <input type="button" name="deliverydate" id="trigger3" value="|
557
      . $locale->text('button') . qq|"></td></td>
565
      . $locale->text('button') . qq|"></td>
558 566
    |;
559 567

  
560 568
    #write Trigger
......
755 763
sub form_footer {
756 764
  $lxdebug->enter_sub();
757 765

  
766
  $auth->assert('invoice_edit');
767

  
758 768
  $form->{invtotal} = $form->{invsubtotal};
759 769

  
760 770
  if (($rows = $form->numtextrows($form->{notes}, 26, 8)) < 2) {
......
1149 1159
| .
1150 1160
$cgi->hidden("-name" => "callback", "-value" => $form->{callback})
1151 1161
. $cgi->hidden('-name' => 'draft_id', '-default' => [$form->{draft_id}])
1152
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}]);
1153
map({ print $cgi->hidden("-name" => $_ , "-value" => $form->{$_});} qw(login password));
1154
print qq|
1162
. $cgi->hidden('-name' => 'draft_description', '-default' => [$form->{draft_description}])
1163
. qq|
1155 1164
</form>
1156 1165

  
1157 1166
</body>
......
1164 1173

  
1165 1174
sub mark_as_paid {
1166 1175
  $lxdebug->enter_sub();
1176

  
1177
  $auth->assert('invoice_edit');
1178

  
1167 1179
  &mark_as_paid_common(\%myconfig,"ar");  
1180

  
1168 1181
  $lxdebug->leave_sub();
1169 1182
}
1170 1183

  
1171 1184
sub update {
1172 1185
  $lxdebug->enter_sub();
1173 1186

  
1187
  $auth->assert('invoice_edit');
1188

  
1174 1189
  my ($recursive_call) = shift;
1175 1190

  
1176 1191
  map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate creditlimit creditremaining) unless $recursive_call;
......
1299 1314
sub post_payment {
1300 1315
  $lxdebug->enter_sub();
1301 1316

  
1317
  $auth->assert('invoice_edit');
1318

  
1302 1319
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
1303 1320
  for $i (1 .. $form->{paidaccounts}) {
1304 1321
    if ($form->{"paid_$i"}) {
......
1332 1349
sub post {
1333 1350
  $lxdebug->enter_sub();
1334 1351

  
1352
  $auth->assert('invoice_edit');
1353

  
1335 1354
  $form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
1336 1355
  $form->isblank("invdate",  $locale->text('Invoice Date missing!'));
1337 1356
  $form->isblank("customer", $locale->text('Customer missing!'));
......
1416 1435
sub print_and_post {
1417 1436
  $lxdebug->enter_sub();
1418 1437

  
1438
  $auth->assert('invoice_edit');
1439

  
1419 1440
  $old_form               = new Form;
1420 1441
  $print_post             = 1;
1421 1442
  $form->{print_and_post} = 1;
......
1429 1450
sub use_as_template {
1430 1451
  $lxdebug->enter_sub();
1431 1452

  
1453
  $auth->assert('invoice_edit');
1454

  
1432 1455
  map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno);
1433 1456
  $form->{paidaccounts} = 1;
1434 1457
  $form->{rowcount}--;
......
1441 1464
sub storno {
1442 1465
  $lxdebug->enter_sub();
1443 1466

  
1467
  $auth->assert('invoice_edit');
1468

  
1444 1469
  if ($form->{storno}) {
1445 1470
    $form->error($locale->text('Cannot storno storno invoice!'));
1446 1471
  }
......
1449 1474
    $form->error($locale->text("Invoice has already been storno'd!"));
1450 1475
  }
1451 1476

  
1452
  map({ my $key = $_; delete($form->{$key})
1453
          unless (grep({ $key eq $_ } qw(login password id stylesheet type))); }
1454
      keys(%{ $form }));
1477
  map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password stylesheet type))); } keys(%{ $form }));
1455 1478

  
1456 1479
  invoice_links();
1457 1480
  prepare_invoice();
......
1474 1497
sub preview {
1475 1498
  $lxdebug->enter_sub();
1476 1499

  
1500
  $auth->assert('invoice_edit');
1501

  
1477 1502
  $form->{preview} = 1;
1478 1503
  $old_form = new Form;
1479 1504
  for (keys %$form) { $old_form->{$_} = $form->{$_} }
......
1485 1510

  
1486 1511
sub delete {
1487 1512
  $lxdebug->enter_sub();
1513

  
1514
  $auth->assert('invoice_edit');
1515

  
1488 1516
  if ($form->{second_run}) {
1489 1517
    $form->{print_and_post} = 0;
1490 1518
  }
......
1500 1528
  map { delete $form->{$_} } qw(action header);
1501 1529

  
1502 1530
  foreach $key (keys %$form) {
1531
    next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
1503 1532
    $form->{$key} =~ s/\"/&quot;/g;
1504 1533
    print qq|<input type="hidden" name="$key" value="$form->{$key}">\n|;
1505 1534
  }
......
1524 1553
sub credit_note {
1525 1554
  $lxdebug->enter_sub();
1526 1555

  
1556
  $auth->assert('invoice_edit');
1557

  
1527 1558
  $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig);
1528 1559
  $form->{duedate} =
1529 1560
    $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
......
1577 1608

  
1578 1609
sub yes {
1579 1610
  $lxdebug->enter_sub();
1611

  
1612
  $auth->assert('invoice_edit');
1613

  
1580 1614
  if (IS->delete_invoice(\%myconfig, \%$form, $spool)) {
1581 1615
    # saving the history
1582 1616
  	if(!exists $form->{addition}) {
......
1595 1629
sub e_mail {
1596 1630
  $lxdebug->enter_sub();
1597 1631

  
1632
  $auth->assert('invoice_edit');
1633

  
1598 1634
  if (!$form->{id}) {
1599 1635
    $print_post = 1;
1600 1636

  
......
1602 1638

  
1603 1639
    post();
1604 1640

  
1605
    my %saved_vars;
1606
    map({ $saved_vars{$_} = $form->{$_}; } qw(id invnumber));
1607
    restore_form($saved_form);
1608
    map({ $form->{$_} = $saved_vars{$_}; } qw(id invnumber));
1641
    restore_form($saved_form, 0, qw(id invnumber));
1609 1642
  }
1610 1643

  
1611 1644
  edit_e_mail();

Auch abrufbar als: Unified diff