Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4f82ce00

Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt

  • ID 4f82ce002979fbe9a59d5e69a53e3697b7df20c1
  • Vorgänger 602a4d98
  • Nachfolger 58ff4d6a

form_footer in ic.pl in Template ausgelagert.

Unterschiede anzeigen:

SL/MoreCommon.pm
3 3
require Exporter;
4 4
@ISA = qw(Exporter);
5 5

  
6
@EXPORT = qw(save_form restore_form compare_numbers);
6
@EXPORT = qw(save_form restore_form compare_numbers any);
7 7

  
8 8
use YAML;
9 9

  
......
76 76
  return $a <=> $b;
77 77
}
78 78

  
79
sub any (&@) {
80
  my $f = shift;
81
  return if ! @_;
82
  for (@_) {
83
    return 1 if $f->();
84
  }
85
  return 0;
86
}
79 87

  
80 88
1;
bin/mozilla/ic.pl
1491 1491

  
1492 1492
  $auth->assert('part_service_assembly_edit');
1493 1493

  
1494
  if ($form->{item} eq "assembly") {
1495

  
1496
    print qq|
1497
	<tr>
1498
	  <td>
1499
            <table width="100%">
1500
              <tr>
1501
                <th colspan=2 align=right>| . $locale->text('Total') . qq|&nbsp;</th>
1502
                <th align=right>| . $form->format_amount(\%myconfig, $form->{assemblytotal}, 2) . qq|</th>
1503
              </tr>
1504
            </table>
1505
          </td>
1506
        </tr>
1507
        <input type=hidden name=assembly_rows value=$form->{assembly_rows}>
1508
|;
1509
  }
1510

  
1511
  print qq|
1512
      <input type=hidden name=callback value="$form->{callback}">
1513
      <input type=hidden name=previousform value="$form->{previousform}">
1514
      <input type=hidden name=taxaccount2 value="$form->{taxaccount2}">
1515
      <input type=hidden name=vc value=$form->{vc}>
1516
  <tr>
1517
    <td><hr size=3 noshade></td>
1518
  </tr>
1519
</table>
1520

  
1521
<br>
1522
<input class=submit type=submit name=action value="|
1523
    . $locale->text('Update') . qq|">
1524
  |;
1525

  
1526
####### moved into makemodel_row #############
1527
#  unless ($form->{item} eq "service") {
1528
#    print qq|
1529
#      <input type=hidden name=makemodel_rows value=$form->{makemodel_rows}>
1530
#    |;
1531
#  }
1532

  
1533
  print qq|
1534
     <input type=hidden name=price_rows value=$form->{price_rows}>|;
1535

  
1536
  print qq|
1537
      <input class=submit type=submit name=action value="|
1538
    . $locale->text('Save') . qq|">|;
1539

  
1540
  if ($form->{id}) {
1541

  
1542
    if (!$form->{previousform}) {
1543
      print qq|
1544
      <input class=submit type=submit name=action value="|
1545
        . $locale->text('Save as new') . qq|">|;
1546
    }
1547

  
1548
    if ($form->{orphaned}) {
1549
      if (!$form->{previousform}) {
1550
        if ($form->{item} eq 'assembly') {
1551
          if (!$form->{onhand}) {
1552
            print qq|
1553
      <input class=submit type=submit name=action value="|
1554
              . $locale->text('Delete') . qq|">|;
1555
          }
1556
        } else {
1557
          print qq|
1558
      <input class=submit type=submit name=action value="|
1559
            . $locale->text('Delete') . qq|">|;
1560
        }
1561
      }
1562
    }
1563
  }
1564

  
1565
  if (!$form->{previousform}) {
1566
    if ($form->{menubar}) {
1567
      require "bin/mozilla/menu.pl";
1568
      &menubar;
1569
    }
1570
  }
1571
# button for saving history
1572
  if($form->{id} ne "") {
1573
  	print qq|
1574
  		<input type=button class=submit onclick=set_history_window(|
1575
  		. $form->{id} 
1576
  		. qq|); name=history id=history value=|
1577
  		. $locale->text('history') 
1578
  		. qq|>|;
1579
  }
1580
# /button for saving history
1581
  print qq|
1582

  
1583
</form>
1584

  
1585
<script type="text/javascript" src="js/wz_tooltip.js"></script>
1586

  
1587
</body>
1588
</html>
1589
|;
1494
  print $form->parse_html_template('ic/form_footer');
1590 1495

  
1591 1496
  $lxdebug->leave_sub();
1592 1497
}
......
1595 1500
  $lxdebug->enter_sub();
1596 1501
  my ($numrows) = @_;
1597 1502
  
1598
  my @mm_data = grep { $_->{make} ne '' || $_->{model} ne '' } map +{ make => $form->{"make_$_"}, model => $form->{"model_$_"} }, 1 .. $numrows;
1503
  my @mm_data = grep { any { $_ ne '' } @$_{qw(make model)} } map +{ make => $form->{"make_$_"}, model => $form->{"model_$_"} }, 1 .. $numrows;
1599 1504
  print $form->parse_html_template('ic/makemodel', { MM_DATA => [ @mm_data, {} ], mm_rows => scalar @mm_data + 1 });
1600 1505

  
1601 1506
  $lxdebug->leave_sub();
locale/de/ic
10 10
  'AP Transaction'              => 'Kreditorenbuchung',
11 11
  'AR'                          => 'Verkauf',
12 12
  'AR Transaction'              => 'Debitorenbuchung',
13
  'Accounting Menu'             => 'Kontoverwaltung',
14 13
  'Active'                      => 'Aktiv',
15 14
  'Add '                        => 'Hinzuf?gen',
16 15
  'Add Assembly'                => 'Erzeugnis erfassen',
......
74 73
  'Date'                        => 'Datum',
75 74
  'Dec'                         => 'Dez',
76 75
  'December'                    => 'Dezember',
77
  'Delete'                      => 'L?schen',
78 76
  'Delivered'                   => 'Geliefert',
79 77
  'Delivery Date'               => 'Lieferdatum',
80 78
  'Delivery Order'              => 'Lieferschein',
......
230 228
  'Sales Invoice'               => 'Rechnung',
231 229
  'Sales Order'                 => 'Kundenauftrag',
232 230
  'Sales quotation'             => 'Angebot',
233
  'Save'                        => 'Speichern',
234
  'Save as new'                 => 'als neu speichern',
235 231
  'Screen'                      => 'Bildschirm',
236 232
  'Select a Customer'           => 'Endkunde ausw?hlen',
237 233
  'Select a customer'           => 'Einen Kunden ausw&auml;hlen',
......
273 269
  'To (time)'                   => 'Bis',
274 270
  'Top 100'                     => 'Top 100',
275 271
  'Top 100 hinzufuegen'         => 'Top 100 hinzuf?gen',
276
  'Total'                       => 'Summe',
277 272
  'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
278 273
  'Transfer To Stock'           => 'Lagereingang',
279 274
  'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
280 275
  'Unit'                        => 'Einheit',
281 276
  'Unit of measure'             => 'Ma?einheit',
282 277
  'Unknown dependency \'%s\'.'  => 'Unbekannte Abh&auml;ngigkeit \'%s\'.',
283
  'Update'                      => 'Erneuern',
284 278
  'Updated'                     => 'Erneuert am',
285 279
  'Value'                       => 'Wert',
286 280
  'Variable'                    => 'Variable',
......
308 302
  'deliverydate'                => 'Lieferdatum',
309 303
  'ea'                          => 'St.',
310 304
  'emailed to'                  => 'gemailt an',
311
  'history'                     => 'Historie',
312 305
  'invoice'                     => 'Rechnung',
313 306
  'no'                          => 'nein',
314 307
  'none (pricegroup)'           => 'keine',
......
340 333
  '_check_io_auth'              => '_check_io_auth',
341 334
  '_update_part_information'    => '_update_part_information',
342 335
  '_update_ship'                => '_update_ship',
343
  'acc_menu'                    => 'acc_menu',
344 336
  'add'                         => 'add',
345 337
  'addtop100'                   => 'addtop100',
346 338
  'assembly_row'                => 'assembly_row',
......
354 346
  'customer_details'            => 'customer_details',
355 347
  'delete'                      => 'delete',
356 348
  'delivery_customer_selection' => 'delivery_customer_selection',
357
  'display'                     => 'display',
358 349
  'display_form'                => 'display_form',
359 350
  'display_row'                 => 'display_row',
360 351
  'edit'                        => 'edit',
......
394 385
  'save_as_new'                 => 'save_as_new',
395 386
  'search'                      => 'search',
396 387
  'search_update_prices'        => 'search_update_prices',
397
  'section_menu'                => 'section_menu',
398 388
  'select_item'                 => 'select_item',
399 389
  'select_part'                 => 'select_part',
400 390
  'select_part_internal'        => 'select_part_internal',
templates/webpages/ic/form_footer_de.html
1
[%- USE HTML %]
2
[%- USE LxERP %]
3
  [%- IF item == 'assembly' %]
4
  <tr>
5
    <td>
6
      <table width="100%">
7
        <tr>
8
          <th colspan="2" align="right">Summe</th>
9
          <th align="right">[% LxERP.format_amount(assemblytotal, 2) %]</th>
10
        </tr>
11
      </table>
12
    </td>
13
  </tr>
14
  <input type="hidden" name="assembly_rows" value="[% HTML.escape(assembly_rows) %]">
15
  [%- END %]
16

  
17
  <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
18
  <input type="hidden" name="previousform" value="[% HTML.escape(previousform) %]">
19
  <input type="hidden" name="taxaccount2" value="[% HTML.escape(taxaccount2) %]">
20
  <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
21
  <tr>
22
    <td><hr size="3" noshade></td>
23
  </tr>
24
</table>
25

  
26
<br>
27
<input class="submit" type="submit" name="action" value="Erneuern">
28
<input type="hidden" name="price_rows" value="[% HTML.escape(price_rows) %]">
29
<input class="submit" type="submit" name="action" value="Speichern">
30

  
31
  [%- IF id %]
32
    [%- UNLESS previousform %]
33
<input class="submit" type="submit" name="action" value="als neu speichern">
34
    [%- END %]
35

  
36
    [%- IF orphaned %]
37
      [%- UNLESS previousform %]
38
        [%- IF item == 'assembly' %] {
39
          [%- UNLESS onhand %]
40
<input class="submit" type="submit" name="action" value="L?schen">
41
          [%- END %]
42
        [%- ELSE %]
43
<input class="submit" type="submit" name="action" value="L?schen">
44
        [%- END %]
45
      [%- END %]
46
    [%- END %]
47
  [%- END %]
48

  
49
  [%- IF id != "" %]
50
<input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="Historie">
51
  [%- END %]
52

  
53
</form>
54

  
55
<script type="text/javascript" src="js/wz_tooltip.js"></script>
56

  
57
</body>
58
</html>
templates/webpages/ic/form_footer_master.html
1
[%- USE HTML %]
2
[%- USE LxERP %]
3
  [%- IF item == 'assembly' %]
4
  <tr>
5
    <td>
6
      <table width="100%">
7
        <tr>
8
          <th colspan="2" align="right"><translate>Total</translate></th>
9
          <th align="right">[% LxERP.format_amount(assemblytotal, 2) %]</th>
10
        </tr>
11
      </table>
12
    </td>
13
  </tr>
14
  <input type="hidden" name="assembly_rows" value="[% HTML.escape(assembly_rows) %]">
15
  [%- END %]
16

  
17
  <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
18
  <input type="hidden" name="previousform" value="[% HTML.escape(previousform) %]">
19
  <input type="hidden" name="taxaccount2" value="[% HTML.escape(taxaccount2) %]">
20
  <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
21
  <tr>
22
    <td><hr size="3" noshade></td>
23
  </tr>
24
</table>
25

  
26
<br>
27
<input class="submit" type="submit" name="action" value="<translate>Update</translate>">
28
<input type="hidden" name="price_rows" value="[% HTML.escape(price_rows) %]">
29
<input class="submit" type="submit" name="action" value="<translate>Save</translate>">
30

  
31
  [%- IF id %]
32
    [%- UNLESS previousform %]
33
<input class="submit" type="submit" name="action" value="<translate>Save as new</translate>">
34
    [%- END %]
35

  
36
    [%- IF orphaned %]
37
      [%- UNLESS previousform %]
38
        [%- IF item == 'assembly' %] {
39
          [%- UNLESS onhand %]
40
<input class="submit" type="submit" name="action" value="<translate>Delete</translate>">
41
          [%- END %]
42
        [%- ELSE %]
43
<input class="submit" type="submit" name="action" value="<translate>Delete</translate>">
44
        [%- END %]
45
      [%- END %]
46
    [%- END %]
47
  [%- END %]
48

  
49
  [%- IF id != "" %]
50
<input type="button" class="submit" onclick="set_history_window([% id %]);" name="history" id="history" value="<translate>history</translate>">
51
  [%- END %]
52

  
53
</form>
54

  
55
<script type="text/javascript" src="js/wz_tooltip.js"></script>
56

  
57
</body>
58
</html>

Auch abrufbar als: Unified diff