Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 142ea3bf

Von Moritz Bunkus vor etwa 4 Jahren hinzugefügt

  • ID 142ea3bff784ba29bd87de5615bb4f2aec8c977f
  • Vorgänger 0b36b225
  • Nachfolger 1baea8cb

Leistungsdatum: DATEV, Debitoren-/Kreditoren-/Dialogbuchungen

Unterschiede anzeigen:

SL/AP.pm
139 139

  
140 140
    $query = qq|UPDATE ap SET invnumber = ?,
141 141
                transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?,
142
                amount = ?, duedate = ?, deliverydate = ?, paid = ?, netamount = ?,
142
                amount = ?, duedate = ?, deliverydate = ?, tax_point = ?, paid = ?, netamount = ?,
143 143
                currency_id = (SELECT id FROM currencies WHERE name = ?), notes = ?, department_id = ?, storno = ?, storno_id = ?,
144 144
                globalproject_id = ?, direct_debit = ?
145 145
               WHERE id = ?|;
146 146
    @values = ($form->{invnumber}, conv_date($form->{transdate}),
147 147
                  $form->{ordnumber}, conv_i($form->{vendor_id}),
148 148
                  $form->{taxincluded} ? 't' : 'f', $form->{invtotal},
149
                  conv_date($form->{duedate}), conv_date($form->{deliverydate}),
149
                  conv_date($form->{duedate}), conv_date($form->{deliverydate}), conv_date($form->{tax_point}),
150 150
                  $form->{invpaid}, $form->{netamount},
151 151
                  $form->{currency}, $form->{notes},
152 152
                  conv_i($form->{department_id}), $form->{storno},
SL/AR.pm
134 134
    $query =
135 135
      qq|UPDATE ar set
136 136
           invnumber = ?, ordnumber = ?, transdate = ?, customer_id = ?,
137
           taxincluded = ?, amount = ?, duedate = ?, deliverydate = ?, paid = ?,
137
           taxincluded = ?, amount = ?, duedate = ?, deliverydate = ?, tax_point = ?, paid = ?,
138 138
           currency_id = (SELECT id FROM currencies WHERE name = ?),
139 139
           netamount = ?, notes = ?, department_id = ?,
140 140
           employee_id = ?, storno = ?, storno_id = ?, globalproject_id = ?,
141 141
           direct_debit = ?
142 142
         WHERE id = ?|;
143 143
    my @values = ($form->{invnumber}, $form->{ordnumber}, conv_date($form->{transdate}), conv_i($form->{customer_id}), $form->{taxincluded} ? 't' : 'f', $form->{amount},
144
                  conv_date($form->{duedate}), conv_date($form->{deliverydate}), $form->{paid},
144
                  conv_date($form->{duedate}), conv_date($form->{deliverydate}), conv_date($form->{tax_point}), $form->{paid},
145 145
                  $form->{currency},
146 146
                  $form->{netamount}, $form->{notes}, conv_i($form->{department_id}),
147 147
                  conv_i($form->{employee_id}), $form->{storno} ? 't' : 'f', $form->{storno_id},
SL/DATEV.pm
517 517

  
518 518
  my $query    =
519 519
    qq|SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ar.id, ac.amount, ac.taxkey, ac.memo,
520
         ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate, ar.itime::date,
520
         ar.invnumber, ar.duedate, ar.amount as umsatz, COALESCE(ar.tax_point, ar.deliverydate) AS deliverydate, ar.itime::date,
521 521
         ct.name, ct.ustid, ct.customernumber AS vcnumber, ct.id AS customer_id, NULL AS vendor_id,
522 522
         $ar_accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
523 523
         ar.invoice,
......
546 546
       UNION ALL
547 547

  
548 548
       SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ap.id, ac.amount, ac.taxkey, ac.memo,
549
         ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate, ap.itime::date,
549
         ap.invnumber, ap.duedate, ap.amount as umsatz, COALESCE(ap.tax_point, ap.deliverydate) AS deliverydate, ap.itime::date,
550 550
         ct.name, ct.ustid, ct.vendornumber AS vcnumber, NULL AS customer_id, ct.id AS vendor_id,
551 551
         $ap_accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
552 552
         ap.invoice,
......
575 575
       UNION ALL
576 576

  
577 577
       SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,gl.id, ac.amount, ac.taxkey, ac.memo,
578
         gl.reference AS invnumber, NULL AS duedate, ac.amount as umsatz, gl.deliverydate, gl.itime::date,
578
         gl.reference AS invnumber, NULL AS duedate, ac.amount as umsatz, COALESCE(gl.tax_point, gl.deliverydate) AS deliverydate, gl.itime::date,
579 579
         gl.description AS name, NULL as ustid, '' AS vcname, NULL AS customer_id, NULL AS vendor_id,
580 580
         c.accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
581 581
         FALSE AS invoice,
SL/DB/MetaSetup/GLTransaction.pm
23 23
  reference      => { type => 'text' },
24 24
  storno         => { type => 'boolean', default => 'false' },
25 25
  storno_id      => { type => 'integer' },
26
  tax_point      => { type => 'date' },
26 27
  taxincluded    => { type => 'boolean' },
27 28
  transdate      => { type => 'date', default => 'now' },
28 29
  type           => { type => 'text' },
SL/Form.pm
2566 2566
    $query =
2567 2567
      qq|SELECT
2568 2568
           a.cp_id, a.invnumber, a.transdate, a.${table}_id, a.datepaid, a.deliverydate,
2569
           a.duedate, a.ordnumber, a.taxincluded, (SELECT cu.name FROM currencies cu WHERE cu.id=a.currency_id) AS currency, a.notes,
2569
           a.duedate, a.tax_point, a.ordnumber, a.taxincluded, (SELECT cu.name FROM currencies cu WHERE cu.id=a.currency_id) AS currency, a.notes,
2570 2570
           a.mtime, a.itime,
2571 2571
           a.intnotes, a.department_id, a.amount AS oldinvtotal,
2572 2572
           a.paid AS oldtotalpaid, a.employee_id, a.gldate, a.type,
SL/GL.pm
123 123
  $query =
124 124
    qq|UPDATE gl SET
125 125
         reference = ?, description = ?, notes = ?,
126
         transdate = ?, deliverydate = ?, department_id = ?, taxincluded = ?,
126
         transdate = ?, deliverydate = ?, tax_point = ?, department_id = ?, taxincluded = ?,
127 127
         storno = ?, storno_id = ?, ob_transaction = ?, cb_transaction = ?
128 128
       WHERE id = ?|;
129 129

  
130 130
  @values = ($form->{reference}, $form->{description}, $form->{notes},
131
             conv_date($form->{transdate}), conv_date($form->{deliverydate}), conv_i($form->{department_id}), $form->{taxincluded} ? 't' : 'f',
131
             conv_date($form->{transdate}), conv_date($form->{deliverydate}), conv_date($form->{tax_point}), conv_i($form->{department_id}), $form->{taxincluded} ? 't' : 'f',
132 132
             $form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f',
133 133
             conv_i($form->{id}));
134 134
  do_query($form, $dbh, $query, @values);
......
637 637

  
638 638
  if ($form->{id}) {
639 639
    $query =
640
      qq|SELECT g.reference, g.description, g.notes, g.transdate, g.deliverydate,
640
      qq|SELECT g.reference, g.description, g.notes, g.transdate, g.deliverydate, g.tax_point,
641 641
           g.storno, g.storno_id,
642 642
           g.department_id, d.description AS department,
643 643
           e.name AS employee, g.taxincluded, g.gldate,
sql/Pg-upgrade2/tax_point.sql
3 3
-- @depends: release_3_5_6_1
4 4
ALTER TABLE ap ADD COLUMN tax_point DATE;
5 5
ALTER TABLE ar ADD COLUMN tax_point DATE;
6
ALTER TABLE gl ADD COLUMN tax_point DATE;
6 7
ALTER TABLE oe ADD COLUMN tax_point DATE;
templates/webpages/ap/form_header.html
163 163
                <th align="right" nowrap>[% 'Due Date' | $T8 %]</th>
164 164
                <td>[% L.date_tag('duedate', duedate) %]</td>
165 165
              </tr>
166
              <tr>
167
                <th align="right" nowrap>[% LxERP.t8('Tax point') %]</th>
168
                <td>[% L.date_tag('tax_point', tax_point, id='tax_point') %]</td>
169
              </tr>
166 170
              <tr>
167 171
                <th align=right nowrap>[% 'Delivery Date' | $T8 %]</th>
168 172
                <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
templates/webpages/ar/form_header.html
141 141
                <th align=right nowrap>[% 'Due Date' | $T8 %]</th>
142 142
                <td>[% L.date_tag('duedate', duedate) %]</td>
143 143
              </tr>
144
              <tr>
145
                <th align="right" nowrap>[% LxERP.t8('Tax point') %]</th>
146
                <td>[% L.date_tag('tax_point', tax_point, id='tax_point') %]</td>
147
              </tr>
144 148
              <tr>
145 149
                <th align=right nowrap>[% 'Delivery Date' | $T8 %]</th>
146 150
                <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
templates/webpages/gl/form_header.html
72 72
        <tr>
73 73
          <th [%- departments_style -%]align="right">[% 'Department' | $T8 %]</th>
74 74
          <td [%- departments_style -%]>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1) %]</td>
75
          <th align=right>[% 'Delivery Date' | $T8 %]</th>
76
          <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
75
          <th align=right>[% 'Tax point' | $T8 %]</th>
76
          <td>[% L.date_tag('tax_point', tax_point) %]</td>
77 77
        </tr>
78 78
        <tr>
79 79
          <th align="right">[% 'Description' | $T8 %]</th>
80 80
          <td>[% L.areainput_tag('description', description, cols=50, readonly=readonly) %]</td>
81
          <th align="right">[% 'MwSt. inkl.' | $T8 %]</th>
82
          <td>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
81
          <th align=right>[% 'Delivery Date' | $T8 %]</th>
82
          <td>[% L.date_tag('deliverydate', deliverydate) %]</td>
83 83
        </tr>
84
[%- IF id %]
85 84
        <tr>
86
          <th align="right">[% 'Mitarbeiter' | $T8 %]</th>
87
          <td>[% L.input_tag('employee', employee, size=20, readonly=readonly) %]</td>
85
          <th align="right">[%- IF id %][% 'Mitarbeiter' | $T8 %][% END %]</th>
86
          <td>[%- IF id %][% L.input_tag('employee', employee, size=20, readonly=readonly) %][% END %]</td>
87
          <th align="right">[% 'MwSt. inkl.' | $T8 %]</th>
88
          <td>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
88 89
        </tr>
89
[%- END %]
90 90

  
91 91
      <tr>
92 92
       <td colspan=4>

Auch abrufbar als: Unified diff