Revision 142ea3bf
Von Moritz Bunkus vor mehr als 4 Jahren hinzugefügt
SL/AP.pm | ||
---|---|---|
|
||
$query = qq|UPDATE ap SET invnumber = ?,
|
||
transdate = ?, ordnumber = ?, vendor_id = ?, taxincluded = ?,
|
||
amount = ?, duedate = ?, deliverydate = ?, paid = ?, netamount = ?,
|
||
amount = ?, duedate = ?, deliverydate = ?, tax_point = ?, paid = ?, netamount = ?,
|
||
currency_id = (SELECT id FROM currencies WHERE name = ?), notes = ?, department_id = ?, storno = ?, storno_id = ?,
|
||
globalproject_id = ?, direct_debit = ?
|
||
WHERE id = ?|;
|
||
@values = ($form->{invnumber}, conv_date($form->{transdate}),
|
||
$form->{ordnumber}, conv_i($form->{vendor_id}),
|
||
$form->{taxincluded} ? 't' : 'f', $form->{invtotal},
|
||
conv_date($form->{duedate}), conv_date($form->{deliverydate}),
|
||
conv_date($form->{duedate}), conv_date($form->{deliverydate}), conv_date($form->{tax_point}),
|
||
$form->{invpaid}, $form->{netamount},
|
||
$form->{currency}, $form->{notes},
|
||
conv_i($form->{department_id}), $form->{storno},
|
SL/AR.pm | ||
---|---|---|
$query =
|
||
qq|UPDATE ar set
|
||
invnumber = ?, ordnumber = ?, transdate = ?, customer_id = ?,
|
||
taxincluded = ?, amount = ?, duedate = ?, deliverydate = ?, paid = ?,
|
||
taxincluded = ?, amount = ?, duedate = ?, deliverydate = ?, tax_point = ?, paid = ?,
|
||
currency_id = (SELECT id FROM currencies WHERE name = ?),
|
||
netamount = ?, notes = ?, department_id = ?,
|
||
employee_id = ?, storno = ?, storno_id = ?, globalproject_id = ?,
|
||
direct_debit = ?
|
||
WHERE id = ?|;
|
||
my @values = ($form->{invnumber}, $form->{ordnumber}, conv_date($form->{transdate}), conv_i($form->{customer_id}), $form->{taxincluded} ? 't' : 'f', $form->{amount},
|
||
conv_date($form->{duedate}), conv_date($form->{deliverydate}), $form->{paid},
|
||
conv_date($form->{duedate}), conv_date($form->{deliverydate}), conv_date($form->{tax_point}), $form->{paid},
|
||
$form->{currency},
|
||
$form->{netamount}, $form->{notes}, conv_i($form->{department_id}),
|
||
conv_i($form->{employee_id}), $form->{storno} ? 't' : 'f', $form->{storno_id},
|
SL/DATEV.pm | ||
---|---|---|
|
||
my $query =
|
||
qq|SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ar.id, ac.amount, ac.taxkey, ac.memo,
|
||
ar.invnumber, ar.duedate, ar.amount as umsatz, ar.deliverydate, ar.itime::date,
|
||
ar.invnumber, ar.duedate, ar.amount as umsatz, COALESCE(ar.tax_point, ar.deliverydate) AS deliverydate, ar.itime::date,
|
||
ct.name, ct.ustid, ct.customernumber AS vcnumber, ct.id AS customer_id, NULL AS vendor_id,
|
||
$ar_accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
|
||
ar.invoice,
|
||
... | ... | |
UNION ALL
|
||
|
||
SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,ap.id, ac.amount, ac.taxkey, ac.memo,
|
||
ap.invnumber, ap.duedate, ap.amount as umsatz, ap.deliverydate, ap.itime::date,
|
||
ap.invnumber, ap.duedate, ap.amount as umsatz, COALESCE(ap.tax_point, ap.deliverydate) AS deliverydate, ap.itime::date,
|
||
ct.name, ct.ustid, ct.vendornumber AS vcnumber, NULL AS customer_id, ct.id AS vendor_id,
|
||
$ap_accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
|
||
ap.invoice,
|
||
... | ... | |
UNION ALL
|
||
|
||
SELECT ac.acc_trans_id, ac.transdate, ac.gldate, ac.trans_id,gl.id, ac.amount, ac.taxkey, ac.memo,
|
||
gl.reference AS invnumber, NULL AS duedate, ac.amount as umsatz, gl.deliverydate, gl.itime::date,
|
||
gl.reference AS invnumber, NULL AS duedate, ac.amount as umsatz, COALESCE(gl.tax_point, gl.deliverydate) AS deliverydate, gl.itime::date,
|
||
gl.description AS name, NULL as ustid, '' AS vcname, NULL AS customer_id, NULL AS vendor_id,
|
||
c.accno, c.description AS accname, c.taxkey_id as charttax, c.datevautomatik, c.id, ac.chart_link AS link,
|
||
FALSE AS invoice,
|
SL/DB/MetaSetup/GLTransaction.pm | ||
---|---|---|
reference => { type => 'text' },
|
||
storno => { type => 'boolean', default => 'false' },
|
||
storno_id => { type => 'integer' },
|
||
tax_point => { type => 'date' },
|
||
taxincluded => { type => 'boolean' },
|
||
transdate => { type => 'date', default => 'now' },
|
||
type => { type => 'text' },
|
SL/Form.pm | ||
---|---|---|
$query =
|
||
qq|SELECT
|
||
a.cp_id, a.invnumber, a.transdate, a.${table}_id, a.datepaid, a.deliverydate,
|
||
a.duedate, a.ordnumber, a.taxincluded, (SELECT cu.name FROM currencies cu WHERE cu.id=a.currency_id) AS currency, a.notes,
|
||
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,
|
||
a.mtime, a.itime,
|
||
a.intnotes, a.department_id, a.amount AS oldinvtotal,
|
||
a.paid AS oldtotalpaid, a.employee_id, a.gldate, a.type,
|
SL/GL.pm | ||
---|---|---|
$query =
|
||
qq|UPDATE gl SET
|
||
reference = ?, description = ?, notes = ?,
|
||
transdate = ?, deliverydate = ?, department_id = ?, taxincluded = ?,
|
||
transdate = ?, deliverydate = ?, tax_point = ?, department_id = ?, taxincluded = ?,
|
||
storno = ?, storno_id = ?, ob_transaction = ?, cb_transaction = ?
|
||
WHERE id = ?|;
|
||
|
||
@values = ($form->{reference}, $form->{description}, $form->{notes},
|
||
conv_date($form->{transdate}), conv_date($form->{deliverydate}), conv_i($form->{department_id}), $form->{taxincluded} ? 't' : 'f',
|
||
conv_date($form->{transdate}), conv_date($form->{deliverydate}), conv_date($form->{tax_point}), conv_i($form->{department_id}), $form->{taxincluded} ? 't' : 'f',
|
||
$form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f',
|
||
conv_i($form->{id}));
|
||
do_query($form, $dbh, $query, @values);
|
||
... | ... | |
|
||
if ($form->{id}) {
|
||
$query =
|
||
qq|SELECT g.reference, g.description, g.notes, g.transdate, g.deliverydate,
|
||
qq|SELECT g.reference, g.description, g.notes, g.transdate, g.deliverydate, g.tax_point,
|
||
g.storno, g.storno_id,
|
||
g.department_id, d.description AS department,
|
||
e.name AS employee, g.taxincluded, g.gldate,
|
sql/Pg-upgrade2/tax_point.sql | ||
---|---|---|
-- @depends: release_3_5_6_1
|
||
ALTER TABLE ap ADD COLUMN tax_point DATE;
|
||
ALTER TABLE ar ADD COLUMN tax_point DATE;
|
||
ALTER TABLE gl ADD COLUMN tax_point DATE;
|
||
ALTER TABLE oe ADD COLUMN tax_point DATE;
|
templates/webpages/ap/form_header.html | ||
---|---|---|
<th align="right" nowrap>[% 'Due Date' | $T8 %]</th>
|
||
<td>[% L.date_tag('duedate', duedate) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" nowrap>[% LxERP.t8('Tax point') %]</th>
|
||
<td>[% L.date_tag('tax_point', tax_point, id='tax_point') %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowrap>[% 'Delivery Date' | $T8 %]</th>
|
||
<td>[% L.date_tag('deliverydate', deliverydate) %]</td>
|
templates/webpages/ar/form_header.html | ||
---|---|---|
<th align=right nowrap>[% 'Due Date' | $T8 %]</th>
|
||
<td>[% L.date_tag('duedate', duedate) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right" nowrap>[% LxERP.t8('Tax point') %]</th>
|
||
<td>[% L.date_tag('tax_point', tax_point, id='tax_point') %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right nowrap>[% 'Delivery Date' | $T8 %]</th>
|
||
<td>[% L.date_tag('deliverydate', deliverydate) %]</td>
|
templates/webpages/gl/form_header.html | ||
---|---|---|
<tr>
|
||
<th [%- departments_style -%]align="right">[% 'Department' | $T8 %]</th>
|
||
<td [%- departments_style -%]>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1) %]</td>
|
||
<th align=right>[% 'Delivery Date' | $T8 %]</th>
|
||
<td>[% L.date_tag('deliverydate', deliverydate) %]</td>
|
||
<th align=right>[% 'Tax point' | $T8 %]</th>
|
||
<td>[% L.date_tag('tax_point', tax_point) %]</td>
|
||
</tr>
|
||
<tr>
|
||
<th align="right">[% 'Description' | $T8 %]</th>
|
||
<td>[% L.areainput_tag('description', description, cols=50, readonly=readonly) %]</td>
|
||
<th align="right">[% 'MwSt. inkl.' | $T8 %]</th>
|
||
<td>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
|
||
<th align=right>[% 'Delivery Date' | $T8 %]</th>
|
||
<td>[% L.date_tag('deliverydate', deliverydate) %]</td>
|
||
</tr>
|
||
[%- IF id %]
|
||
<tr>
|
||
<th align="right">[% 'Mitarbeiter' | $T8 %]</th>
|
||
<td>[% L.input_tag('employee', employee, size=20, readonly=readonly) %]</td>
|
||
<th align="right">[%- IF id %][% 'Mitarbeiter' | $T8 %][% END %]</th>
|
||
<td>[%- IF id %][% L.input_tag('employee', employee, size=20, readonly=readonly) %][% END %]</td>
|
||
<th align="right">[% 'MwSt. inkl.' | $T8 %]</th>
|
||
<td>[% L.checkbox_tag('taxincluded', checked=taxincluded) %]</td>
|
||
</tr>
|
||
[%- END %]
|
||
|
||
<tr>
|
||
<td colspan=4>
|
Auch abrufbar als: Unified diff
Leistungsdatum: DATEV, Debitoren-/Kreditoren-/Dialogbuchungen