Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5b47ed3e

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID 5b47ed3efe5f4ef0810096b0f4849047cee54690
  • Vorgänger ef5a164c
  • Nachfolger b4e8cd54

Bei Einkaufs- und Verkaufsmasken Felder für Angebots- und Auftragsdatum hinzugefügt.

Unterschiede anzeigen:

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

  
6
@EXPORT = qw(conv_i conv_date do_query selectrow_query do_statement dump_query);
6
@EXPORT = qw(conv_i conv_date conv_dateq do_query selectrow_query do_statement dump_query);
7 7

  
8 8
sub conv_i {
9 9
  my ($value, $default) = @_;
......
15 15
  return (defined($value) && "$value" ne "") ? $value : undef;
16 16
}
17 17

  
18
sub conv_dateq {
19
  my ($value) = @_;
20
  if (defined($value) && "$value" ne "") {
21
    $value =~ s/\'/\'\'/g;
22
    return "'$value'";
23
  }
24
  return "NULL";
25
}
26

  
18 27
sub do_query {
19 28
  my ($form, $dbh, $query) = splice(@_, 0, 3);
20 29

  
SL/IR.pm
35 35
package IR;
36 36

  
37 37
use SL::AM;
38
use SL::DBUtils;
38 39

  
39 40
sub post_invoice {
40 41
  $main::lxdebug->enter_sub();
......
624 625
	      ordnumber = '$form->{ordnumber}',
625 626
	      quonumber = '$form->{quonumber}',
626 627
              transdate = '$form->{invdate}',
628
              orddate = | . conv_dateq($form->{"orddate"}) . qq|,
629
              quodate = | . conv_dateq($form->{"quodate"}) . qq|,
627 630
              vendor_id = $form->{vendor_id},
628 631
              amount = $amount,
629 632
              netamount = $netamount,
......
845 848

  
846 849
    # retrieve invoice
847 850
    $query = qq|SELECT a.cp_id, a.invnumber, a.transdate AS invdate, a.duedate,
851
                a.orddate, a.quodate,
848 852
                a.ordnumber, a.quonumber, a.paid, a.taxincluded, a.notes, a.taxzone_id, a.storno, a.gldate,
849 853
		a.intnotes, a.curr AS currency
850 854
		FROM ap a
SL/IS.pm
36 36

  
37 37
use Data::Dumper;
38 38
use SL::AM;
39
use SL::DBUtils;
39 40

  
40 41
sub invoice_details {
41 42
  $main::lxdebug->enter_sub();
......
982 983
              quonumber = '$form->{quonumber}',
983 984
              cusordnumber = '$form->{cusordnumber}',
984 985
              transdate = '$form->{invdate}',
986
              orddate = | . conv_dateq($form->{orddate}) . qq|,
987
              quodate = | . conv_dateq($form->{quodate}) . qq|,
985 988
              customer_id = $form->{customer_id},
986 989
              amount = $amount,
987 990
              netamount = $netamount,
......
1484 1487

  
1485 1488
    # retrieve invoice
1486 1489
    $query = qq|SELECT a.invnumber, a.ordnumber, a.quonumber, a.cusordnumber,
1490
                a.orddate, a.quodate,
1487 1491
                a.transdate AS invdate, a.deliverydate, a.paid, a.storno, a.gldate,
1488 1492
                a.shippingpoint, a.shipvia, a.terms, a.notes, a.intnotes, a.taxzone_id,
1489 1493
		a.duedate, a.taxincluded, a.curr AS currency, a.shipto_id, a.cp_id,
bin/mozilla/ir.pl
356 356

  
357 357
  $form->{"javascript"} .= qq|<script type="text/javascript" src="js/show_form_details.js"></script>|;
358 358

  
359
  $jsscript .=
360
    $form->write_trigger(\%myconfig, 2,
361
                         "orddate", "BL", "trigger_orddate",
362
                         "quodate", "BL", "trigger_quodate");
363

  
359 364
  $form->header;
360 365

  
361 366
  print qq|
......
448 453
		<td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
449 454
<input type=hidden name=quonumber value="$form->{quonumber}">
450 455
	      </tr>
456
        <tr>
457
          <th align="right" nowrap>| . $locale->text('Order Date') . qq|</th>
458
          <td><input name="orddate" id="orddate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{orddate}) . qq|"></td>
459
          <td><input type="button" name="b_orddate" id="trigger_orddate" value="?"></td>
460
        </tr>
461
        <tr>
462
          <th align="right" nowrap>| . $locale->text('Quotation Date') . qq|</th>
463
          <td><input name="quodate" id="quodate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{quodate}) . qq|"></td>
464
          <td><input type="button" name="b_quodate" id="trigger_quodate" value="?"></td>
465
        </tr>
451 466
	    </table>
452 467
	  </td>
453 468
	</tr>
bin/mozilla/is.pl
582 582

  
583 583
  $form->{"javascript"} .= qq|<script type="text/javascript" src="js/show_form_details.js"></script>|;
584 584

  
585
  $jsscript .=
586
    $form->write_trigger(\%myconfig, 2,
587
                         "orddate", "BL", "trigger_orddate",
588
                         "quodate", "BL", "trigger_quodate");
589

  
585 590
  $form->header;
586 591

  
587 592
  print qq|
......
748 753
		<th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
749 754
		<td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
750 755
	      </tr>
756
        <tr>
757
          <th align="right" nowrap>| . $locale->text('Order Date') . qq|</th>
758
          <td><input name="orddate" id="orddate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{orddate}) . qq|"></td>
759
          <td><input type="button" name="b_orddate" id="trigger_orddate" value="?"></td>
760
        </tr>
751 761
	      <tr>
752 762
		<th align=right nowrap>| . $locale->text('Quotation Number') . qq|</th>
753 763
		<td><input name=quonumber size=11 value="$form->{quonumber}"></td>
754 764
	      </tr>
765
        <tr>
766
          <th align="right" nowrap>| . $locale->text('Quotation Date') . qq|</th>
767
          <td><input name="quodate" id="quodate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{quodate}) . qq|"></td>
768
          <td><input type="button" name="b_quodate" id="trigger_quodate" value="?"></td>
769
        </tr>
755 770
	      <tr>
756 771
		<th align=right nowrap>| . $locale->text('Customer Order Number') . qq|</th>
757 772
		<td><input name=cusordnumber size=11 value="$form->{cusordnumber}"></td>
bin/mozilla/oe.pl
2140 2140

  
2141 2141
    # also copy deliverydate from the order
2142 2142
    $form->{deliverydate} = $form->{reqdate} if $form->{reqdate};
2143
    $form->{orddate} = $form->{transdate};
2143 2144
  } else {
2144 2145
    $form->isblank("quonumber", $locale->text('Quotation Number missing!'));
2145 2146
    $form->isblank("transdate", $locale->text('Quotation Date missing!'));
2146 2147
    $form->{ordnumber} = "";
2148
    $form->{quodate} = $form->{transdate};
2147 2149
  }
2148 2150

  
2149 2151
  # if the name changed get new values
doc/dokumentenvorlagen-und-variablen.html
507 507
    <td><code>notes</code></td>
508 508
    <td>Bemerkungen der Rechnung</td>
509 509
   </tr>
510
   <tr>
511
    <td><code>orddate</code></td>
512
    <td>Auftragsdatum</td>
513
   </tr>
510 514
   <tr>
511 515
    <td><code>ordnumber</code></td>
512 516
    <td>Auftragsnummer, wenn die Rechnung aus einem Auftrag erstellt wurde</td>
......
515 519
    <td><code>payment_terms</code></td>
516 520
    <td>Zahlungskonditionen</td>
517 521
   </tr>
522
   <tr>
523
    <td><code>quodate</code></td>
524
    <td>Angebotsdatum</td>
525
   </tr>
518 526
   <tr>
519 527
    <td><code>quonumber</code></td>
520 528
    <td>Angebotsnummer</td>
locale/de/ir
104 104
  'Oct'                         => 'Okt',
105 105
  'October'                     => 'Oktober',
106 106
  'OpenDocument/OASIS'          => 'OpenDocument/OASIS',
107
  'Order Date'                  => 'Auftragsdatum',
107 108
  'Order Date missing!'         => 'Auftragsdatum fehlt!',
108 109
  'Order Number'                => 'Auftragsnummer',
109 110
  'Order Number missing!'       => 'Auftragsnummer fehlt!',
......
138 139
  'Queue'                       => 'Warteschlange',
139 140
  'Queued'                      => 'In Warteschlange eingereiht.',
140 141
  'Quotation'                   => 'Angebot',
142
  'Quotation Date'              => 'Angebotsdatum',
141 143
  'Quotation Date missing!'     => 'Angebotsdatum fehlt!',
142 144
  'Quotation Number missing!'   => 'Angebotsnummer fehlt!',
143 145
  'RFQ'                         => 'Anfrage',
locale/de/is
122 122
  'October'                     => 'Oktober',
123 123
  'OpenDocument/OASIS'          => 'OpenDocument/OASIS',
124 124
  'Order'                       => 'Auftrag',
125
  'Order Date'                  => 'Auftragsdatum',
125 126
  'Order Date missing!'         => 'Auftragsdatum fehlt!',
126 127
  'Order Number'                => 'Auftragsnummer',
127 128
  'Order Number missing!'       => 'Auftragsnummer fehlt!',
......
160 161
  'Queue'                       => 'Warteschlange',
161 162
  'Queued'                      => 'In Warteschlange eingereiht.',
162 163
  'Quotation'                   => 'Angebot',
164
  'Quotation Date'              => 'Angebotsdatum',
163 165
  'Quotation Date missing!'     => 'Angebotsdatum fehlt!',
164 166
  'Quotation Number'            => 'Angebotsnummer',
165 167
  'Quotation Number missing!'   => 'Angebotsnummer fehlt!',
sql/Pg-upgrade2/ap_ar_orddate_quodate.sql
1
-- @tag: ap_ar_orddate_quodate
2
-- @description: Spalten f&uuml;r Angebots- und Auftragsdatum bei Einkaufs- und Verkaufsrechnungen
3
-- @depends: release_2_4_1
4
ALTER TABLE ar ADD COLUMN orddate date;
5
ALTER TABLE ar ADD COLUMN quodate date;
6
ALTER TABLE ap ADD COLUMN orddate date;
7
ALTER TABLE ap ADD COLUMN quodate date;

Auch abrufbar als: Unified diff