From b85b47c5656456624239794cf821c824a947a93f Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Fri, 9 Feb 2007 15:13:57 +0000 Subject: [PATCH] =?utf8?q?Erstes=20Update=20zur=20USTVA=20Anpassung=20an?= =?utf8?q?=2016%/19%.=20-=20Kennziffern=2081,811,=2051,511=20werden=202006?= =?utf8?q?=20und=202007=20unterst=C3=BCtzt.=20-=20HTML=20testscript=20f?= =?utf8?q?=C3=BCr=20selenium=20IDE?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/USTVA.pm | 41 +- bin/mozilla/ustva.pl | 10 +- sql/Pg-upgrade2/ustva_setup_2007.sql | 35 + t/selenium/incomming/ustva-IST-Inland.html | 877 ++++++++++++++++++ templates/German-ustva.html | 24 +- .../ustva_setup_2007_error_master.html | 5 + 6 files changed, 984 insertions(+), 8 deletions(-) create mode 100644 sql/Pg-upgrade2/ustva_setup_2007.sql create mode 100644 t/selenium/incomming/ustva-IST-Inland.html create mode 100644 templates/webpages/dbupgrade/ustva_setup_2007_error_master.html diff --git a/SL/USTVA.pm b/SL/USTVA.pm index 09f56836a..55122a618 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -597,6 +597,27 @@ sub ustva { &get_accounts_ustva($dbh, $last_period, $form->{fromdate}, $form->{todate}, $form, $category); + + # 16%/19% Umstelung + # Umordnen der Kennziffern und abfangen von Fehlern + +# $form->header; +# print $form->{81}; + + if ( $form->{year} < 2007) { + $form->{35} += $form->{81}; + $form->{36} += $form->{811}; + $form->{95} += $form->{89}; + $form->{98} += $form->{891}; + map { delete $form->{$_} } qw(81 811 89 891); + } else { + $form->{35} += $form->{51}; + $form->{36} += $form->{511}; + $form->{95} += $form->{97}; + $form->{98} += $form->{971}; + map { delete $form->{$_} } qw(51 511 97 971); + } + # # Berechnung der USTVA Formularfelder laut Bogen 207 # @@ -705,15 +726,25 @@ sub get_accounts_ustva { select amount from ar where id = ac.trans_id ) ) AS amount, - c.pos_ustva + tk.pos_ustva FROM acc_trans ac - JOIN chart c ON (c.id = ac.chart_id) - --JOIN ar ON (ar.id = ac.trans_id) - where + LEFT JOIN chart c ON (c.id = ac.chart_id) + LEFT JOIN ar ON (ar.id = ac.trans_id) + LEFT JOIN taxkeys tk ON ( + tk.id = ( + SELECT id FROM taxkeys + WHERE chart_id=ac.chart_id + AND taxkey_id=ac.taxkey + + AND startdate <= COALESCE(ar.deliverydate, ar.transdate) + ORDER BY startdate DESC LIMIT 1 + ) + ) + WHERE 1=1 -- Here no where, please. All Transactions ever should be -- testet if they are paied in the USTVA report period. - GROUP BY c.pos_ustva + GROUP BY tk.pos_ustva UNION -- alle Ausgaben AP erfassen diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index de1de620d..2368545f1 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -535,7 +535,12 @@ sub generate_ustva { # init some form vars my @anmeldungszeitraum = - qw('0401' '0402' '0403' '0404' '0405' '0405' '0406' '0407' '0408' '0409' '0410' '0411' '0412' '0441' '0442' '0443' '0444'); + qw('0401' '0402' '0403' + '0404' '0405' '0406' + '0407' '0408' '0409' + '0410' '0411' '0412' + '0441' '0442' '0443' '0444'); + foreach my $item (@anmeldungszeitraum) { $form->{$item} = ""; } @@ -662,7 +667,8 @@ sub generate_ustva { }; } - + # Kontrollvariable für die Templates + $form->{'year2007'} = ($form->{year} >= 2007 ) ? "1":"0"; # Get the USTVA diff --git a/sql/Pg-upgrade2/ustva_setup_2007.sql b/sql/Pg-upgrade2/ustva_setup_2007.sql new file mode 100644 index 000000000..6126636ad --- /dev/null +++ b/sql/Pg-upgrade2/ustva_setup_2007.sql @@ -0,0 +1,35 @@ +-- @tag: ustva_setup_2007 +-- @description: Aktualisierung des SKR03 für 2006 +-- @depends: customer_vendor_taxzone_id + +update taxkeys set pos_ustva='81' where startdate='2007-01-01' + AND pos_ustva ='51' + AND + EXISTS ( -- update only for SKR03 + SELECT coa FROM defaults + WHERE defaults.coa='Germany-DATEV-SKR03EU' + ); + + +UPDATE taxkeys SET pos_ustva='511' + WHERE startdate='1970-01-01' + AND chart_id = (select id from chart where accno ='1775') + AND + EXISTS ( -- update only for SKR03 + SELECT coa FROM defaults + WHERE defaults.coa='Germany-DATEV-SKR03EU' + ); + + +INSERT INTO taxkeys ( + chart_id, tax_id, taxkey_id, pos_ustva, startdate) + SELECT chart.id, tax.id, taxkey_id, '811', '2007-01-01' + FROM chart + LEFT JOIN tax ON (chart.id = tax.chart_id) + WHERE chart.accno = '1776' + AND + EXISTS ( -- update only for SKR03 + SELECT coa FROM defaults + WHERE defaults.coa='Germany-DATEV-SKR03EU' + ) +; diff --git a/t/selenium/incomming/ustva-IST-Inland.html b/t/selenium/incomming/ustva-IST-Inland.html new file mode 100644 index 000000000..38725de0b --- /dev/null +++ b/t/selenium/incomming/ustva-IST-Inland.html @@ -0,0 +1,877 @@ + + + + +ustva-IST-Inland + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ustva-IST-Inland
open/erp-unstable.orig/admin.pl
assertTitleLx-Office ERP 2.4.1 Administration -
clickAndWaitdocument.forms[0].action[0]
assertTitleLx-Office ERP Administration -
clickAndWaitdocument.forms[0].action[2]
assertTitleLx-Office ERP / Datenbankadministration -
typedbuserlxoffice
typedbpasswd1qayxsw2
clickAndWaitaction
assertTitleLx-Office ERP Datenbankadministration / Datenbank anlegen -
clickdocument.forms[0].chart[2]
typedbskr03-2
clickAndWaitaction
clickAndWaitaction
assertTitleLx-Office ERP Administration -
typelogindemo
typepassworddemo
clickAndWaitdocument.forms[1].action
assertTitleDatenbankaktualisierung - Lx-Office Version 2.4.1 - -
clickAndWait//input[@value='Weiter']
assertTitleLx-Office Version 2.4.1 - - skr03-2
selectFramerelative=up
clicklink=Kunde erfassen
pause5000
selectFramemain_window
typenameTestkunde
clickAndWaitaction
selectFramerelative=up
clickAndWaitlink=Ware erfassen
pause5000
selectFramemain_window
typedescriptionTestware
selectbuchungsgruppen_idlabel=Standard 16%/19%
typesellprice100
clickAndWaitdocument.ic.action[1]
selectFramerelative=up
clicklink=Rechnung erfassen
pause5000
selectFramemain_window
selectWindowmain_window
typeinvnumber1
typepartnumber_11
typeinvdate1.3.2007
typedatepaid_110.3.2007
typesource_11
typememo_11
typepaid_1119
clickAndWaitdocument.invoice.action[6]
clickAndWaitdocument.invoice.action[6]
selectFramerelative=up
clicklink=Rechnung erfassen
pause5000
selectFramemain_window
typeinvnumber2
typeinvdate11.11.2006
typedatepaid_120.11.2006
typepartnumber_11
typesource_14
typememo_14
typepaid_1116
clickAndWaitdocument.invoice.action[6]
clickAndWaitdocument.invoice.action[6]
selectFramerelative=up
clicklink=Rechnung erfassen
pause3000
selectFramemain_window
typeinvnumber3
typeduedate10.12.2006
typepartnumber_11
clickAndWaitupdate_button
verifyTextPresentUmsatzsteuer 19%
verifyTextPresent19,00
typedeliverydate15.12.2006
clickAndWaitupdate_button
verifyTextPresentUmsatzsteuer 16%
verifyTextPresent16,00
typedatepaid_120.12.2006
typesource_14
typememo_14
typepaid_1116
clickAndWaitdocument.invoice.action[6]
selectFramerelative=up
clicklink=Rechnung erfassen
pause3000
selectFramemain_window
typeinvnumber4
typeinvdate8.08.2006
typedeliverydate10.09.2006
typepartnumber_11
clickAndWaitupdate_button
verifyText//tr[6]/td/table/tbody/tr/td[2]/table/tbody/tr[2]/td16,00
typedatepaid_12.2.2007
typesource_17
typememo_17
typepaid_1116
clickAndWaitdocument.invoice.action[6]
selectFramerelative=up
clicklink=Rechnung erfassen
pause3000
selectFramemain_window
typeinvnumber5
typeinvdate10.06.2006
typedeliverydate13.1.2007
typepartnumber_11
typedatepaid_112.7.2006
typesource_145
typememo_144
typepaid_1119
clickAndWaitdocument.invoice.action[6]
clickAndWaitdocument.invoice.action[6]
selectFramerelative=up
clicklink=UStVa
pause3000
selectFramemain_window
selectyearlabel=2007
selectzeitraumlabel=März
clickAndWaitaction
verifyText//tr[9]/td[2](Spalte 81)
verifyText//tr[9]/td[3]100
verifyText//tr[9]/td[5]19,00
selectFramerelative=up
selectFramerelative=up
clicklink=UStVa
pause3000
selectFramemain_window
selectzeitraumlabel=November
clickAndWaitaction
verifyText//tr[9]/td[2](Spalte 51)
verifyText//tr[9]/td[3]100
verifyText//tr[9]/td[5]16,00
selectFramerelative=up
clicklink=UStVa
pause3000
selectFramemain_window
selectyearlabel=2006
selectzeitraumlabel=Dezember
clickAndWaitaction
verifyText//tr[9]/td[2](Spalte 51)
verifyText//tr[9]/td[3]100
verifyText//tr[9]/td[5]16,00
selectFramerelative=up
clicklink=UStVa
pause3000
selectFramemain_window
selectyearlabel=2007
selectzeitraumlabel=Februar
clickAndWaitaction
verifyText//tr[11]/td[2]35
verifyText//tr[11]/td[3]100
verifyText//tr[11]/td[4]36
verifyText//tr[11]/td[5]16,00
selectFramerelative=up
clicklink=UStVa
pause3000
selectFramemain_window
selectzeitraumlabel=Juli
clickAndWaitaction
verifyText//tr[11]/td[2]35
verifyText//tr[11]/td[3]100
verifyText//tr[11]/td[4]36
verifyText//tr[11]/td[5]19,00
+ + diff --git a/templates/German-ustva.html b/templates/German-ustva.html index 42170629d..550b2e7f4 100644 --- a/templates/German-ustva.html +++ b/templates/German-ustva.html @@ -138,6 +138,7 @@ Vorsteuerabzug.
Ums Steuerpflichtige Umsätze +<%if not year2007%> zum Steuersatz von 16 v.H. (Spalte 51) @@ -145,6 +146,17 @@ Vorsteuerabzug.
Ums (Spalte 51 rechts) <%511%> +<%end year2007%> +<%if year2007%> + + zum Steuersatz von 19 v.H. + (Spalte 81) + <%81%>
+ (Spalte 81 rechts) + <%811%> + +<%end year2007%> + zum Steuersatz von 7 v.H. (Spalte 86) @@ -186,7 +198,7 @@ Vorsteuerabzug.
Ums - +<%if not year2007%> Steuerpflichtige zum Steuersatz von 16 v.H. (Spalte 97) @@ -194,6 +206,16 @@ Vorsteuerabzug.
Ums (Spalte 97 rechts) <%971%> +<%end if year2007%> +<%if year2007%> + + Steuerpflichtige zum Steuersatz von 19 v.H. + (Spalte 89) + <%89%>
+ (Spalte 89 rechts) + <%891%> + +<%end if year2007%> zum Steuersatz von 7 v.H. (Spalte 93) diff --git a/templates/webpages/dbupgrade/ustva_setup_2007_error_master.html b/templates/webpages/dbupgrade/ustva_setup_2007_error_master.html new file mode 100644 index 000000000..d62657e88 --- /dev/null +++ b/templates/webpages/dbupgrade/ustva_setup_2007_error_master.html @@ -0,0 +1,5 @@ +

Error:

+ +
+ +
-- 2.20.1