address_street1 => { type => 'text' },
address_street2 => { type => 'text' },
address_zipcode => { type => 'text' },
+ advance_payment_clearing_chart_id => { type => 'integer' },
allow_new_purchase_delivery_order => { type => 'boolean', default => 'true', not_null => 1 },
allow_new_purchase_invoice => { type => 'boolean', default => 'true', not_null => 1 },
allow_sales_invoice_from_sales_order => { type => 'boolean', default => 'true', not_null => 1 },
'Cleared Balance' => 'abgeschlossen',
'Cleared/uncleared only' => 'Status abgeglichen',
'Clearing Tax Received (No 71)' => 'Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)',
+ 'Clearing account for advance payments' => 'Verrechnungskonto für Anzahlungen',
'Client' => 'Mandant',
'Client #1' => 'Mandant #1',
'Client Configuration' => 'Mandantenkonfiguration',
'Cleared Balance' => '',
'Cleared/uncleared only' => '',
'Clearing Tax Received (No 71)' => '',
+ 'Clearing account for advance payments' => '',
'Client' => '',
'Client #1' => '',
'Client Configuration' => '',
--- /dev/null
+-- @tag: defaults_advance_payment_clearing_chart_id
+-- @description: Voreingestelltes Konto für Verrechnung von Anzahlungen
+-- @depends: new_chart_1593_1495
+
+ALTER TABLE defaults ADD COLUMN advance_payment_clearing_chart_id INTEGER;
+
+DO $$
+BEGIN
+
+ IF ( SELECT coa FROM defaults ) = 'Germany-DATEV-SKR03EU' THEN
+ DECLARE
+ clearing_accno text := '1593';
+
+ BEGIN
+ IF ( SELECT COUNT(accno) FROM chart WHERE accno LIKE clearing_accno ) = 1 THEN
+ UPDATE defaults SET advance_payment_clearing_chart_id = (SELECT id FROM chart WHERE accno LIKE clearing_accno);
+ END IF;
+ END;
+ END IF;
+
+ IF ( SELECT coa FROM defaults ) = 'Germany-DATEV-SKR04EU' THEN
+ DECLARE
+ clearing_accno text := '1495';
+
+ BEGIN
+ IF ( SELECT COUNT(accno) FROM chart WHERE accno LIKE clearing_accno ) = 1 THEN
+ UPDATE defaults SET advance_payment_clearing_chart_id = (SELECT id FROM chart WHERE accno LIKE clearing_accno);
+ END IF;
+ END;
+ END IF;
+
+END $$;
<td>[% P.chart.picker('defaults.ar_chart_id', SELF.defaults.ar_chart_id, type='AR', choose=1, style=style) %]<td>
</tr>
+ <tr>
+ <td align="right">[% LxERP.t8("Clearing account for advance payments") %]</td>
+ <td>[% P.chart.picker('defaults.advance_payment_clearing_chart_id', SELF.defaults.advance_payment_clearing_chart_id, choose=1, style=style) %]<td>
+ </tr>
+
<tr>
<td align="right">[% LxERP.t8("Account for workflow from purchase order to ap transaction") %]</td>
<td>[% P.chart.picker('defaults.workflow_po_ap_chart_id', SELF.defaults.workflow_po_ap_chart_id, type='AP_amount', choose=1, style=style) %]<td>