From: Sven Donath Date: Tue, 28 Dec 2010 15:06:13 +0000 (+0100) Subject: Merge branch 'master' of ssh://git-sdonath@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.2beta1~51^2~6 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/bcf0bab00f8055942e9ef4eade9381a8d47213e5?hp=b1dbc0a2a7a5b363ee05d62acdc86bc8c76bb1be Merge branch 'master' of ssh://git-sdonath@lx-office.linet-services.de/~/lx-office-erp --- diff --git a/SL/RP.pm b/SL/RP.pm index 607eb389e..84dd73e22 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -53,6 +53,8 @@ use strict; sub get_openbalance_date { my ($closedto, $target) = map { $::locale->parse_date_to_object(\%::myconfig, $_) } @_; + return unless $closedto; + $closedto->subtract(years => 1) while ($target - $closedto)->is_negative; $closedto->add(days => 1); return $::locale->format_date(\%::myconfig, $closedto); diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index b0831022c..e3c64b0c6 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -1064,8 +1064,9 @@ sub generate_income_statement { last SWITCH; }; } - } - + hotfix_reformat_date(); + } # Ende Bericht für vorgewählten Zeitraum (warum auch immer die Prüfung (custom eq true) ist ... + RP->income_statement(\%myconfig, \%$form); ($form->{department}) = split /--/, $form->{department}; @@ -1294,6 +1295,7 @@ sub generate_trial_balance { last SWITCH; }; } + hotfix_reformat_date(); } @@ -2728,6 +2730,7 @@ sub generate_bwa { last SWITCH; }; } + hotfix_reformat_date(); } else { # die konvertierungen nur dann durchführen, wenn auch daten gesetzt sind. # ansonsten ist die prüfung in RP.pm @@ -2735,12 +2738,12 @@ sub generate_bwa { # immer wahr if ($form->{fromdate}){ my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{fromdate}); - $form->{fromdate} = "${dd}.${mm}.${yy}"; - $form->{comparefromdate} = "01.01.$yy"; + my $datetime = $locale->parse_date_to_object(\%myconfig, $form->{fromdate}); + $datetime->set( month => 1, + day => 1); + $form->{comparefromdate} = $locale->format_date(\%::myconfig, $datetime); } if ($form->{todate}){ - my ($yy, $mm, $dd) = $locale->parse_date(\%myconfig, $form->{todate}); - $form->{todate} = "${dd}.${mm}.${yy}"; $form->{comparetodate} = $form->{todate}; } } @@ -2787,5 +2790,32 @@ sub generate_bwa { $main::lxdebug->leave_sub(); } +### +# Hotfix, um das Datumsformat, die unten hart auf deutsches Datumsformat eingestellt +# sind, entsprechend mit anderem Formaten (z.B. iso-kodiert) zum Laufen zu bringen (S.a.: Bug 1388) +sub hotfix_reformat_date { + + $main::lxdebug->enter_sub(); + + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; + + if ($myconfig{dateformat} ne 'dd.mm.yyyy'){ + my $current_dateformat = $myconfig{dateformat}; + $myconfig{dateformat} = 'dd.mm.yyyy'; + $form->{fromdate} = $main::locale->reformat_date(\%myconfig, $form->{fromdate}, $current_dateformat); + $form->{todate} = $main::locale->reformat_date(\%myconfig, $form->{todate}, $current_dateformat); + $form->{comparefromdate} = $main::locale->reformat_date(\%myconfig, $form->{comparefromdate}, $current_dateformat) + unless (!defined ($form->{comparefromdate})); + $form->{comparetodate} = $main::locale->reformat_date(\%myconfig, $form->{comparetodate}, $current_dateformat) + unless (!defined ($form->{comparetodate})); + + # Und wieder zurücksetzen + $myconfig{dateformat} = $current_dateformat; #'dd.mm.yyyy'; + } # Ende Hotifx Bug 1388 + + $main::lxdebug->leave_sub(); +} 1; diff --git a/templates/Default-packing_list.html b/templates/Default-packing_list.html deleted file mode 100644 index 68ed2edea..000000000 --- a/templates/Default-packing_list.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - -
- - - - - - - - - -
-

- <%company%> -
<%address%> -

-
-

P A C K I N G    L I S T

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Date <%invdate%>
Number<%invnumber%>
-
-
- - - - - - - - -
Ship To:
<%shiptoname%> -
<%shiptostreet%> -
<%shiptozipcode%> -
<%shiptocity%> -
<%shiptocountry%> -<%if shiptocontact%> -

Attn: <%shiptocontact%> -<%end shiptocontact%> - -

-
-
- - - - - - - - -<%foreach number%> - - - - - - -<%end number%> - - - - - -
NumberDescriptionQt'y 
<%number%><%description%><%qty%><%unit%>

-
- - -<%if notes%> - - -<%end notes%> - - - -
Notes
<%notes%>
- <%shippingpoint%> -
-
- - - - - -
- Items returned are subject to - a 10% restocking charge. A return authorization must be obtained - from <%company%> before goods are returned. Returns must be shipped - prepaid and properly insured. <%company%> will not be responsible - for damages during transit. - - - X
-
-
- -
- - - - diff --git a/templates/Default-packing_list.tex b/templates/Default-packing_list.tex deleted file mode 100644 index 2224f9292..000000000 --- a/templates/Default-packing_list.tex +++ /dev/null @@ -1,122 +0,0 @@ -\documentclass[twoside]{scrartcl} -\usepackage[frame]{xy} -\usepackage{tabularx} -\usepackage[utf8]{inputenc} -\setlength{\voffset}{0.5cm} -\setlength{\hoffset}{-2.0cm} -\setlength{\topmargin}{0cm} -\setlength{\headheight}{0.5cm} -\setlength{\headsep}{1cm} -\setlength{\topskip}{0pt} -\setlength{\oddsidemargin}{1.0cm} -\setlength{\evensidemargin}{1.0cm} -\setlength{\textwidth}{19.2cm} -\setlength{\textheight}{24.5cm} -\setlength{\footskip}{1cm} -\setlength{\parindent}{0pt} -\renewcommand{\baselinestretch}{1} -\begin{document} - -\newlength{\descrwidth}\setlength{\descrwidth}{10cm} - -\newsavebox{\hdr} -\sbox{\hdr}{ - \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont - - \parbox{\textwidth}{ - \parbox[b]{12cm}{ - <%company%> - - <%address%>}\hfill - \begin{tabular}[b]{rr@{}} - Telephone & <%tel%>\\ - Facsimile & <%fax%> - \end{tabular} - - \rule[1.5ex]{\textwidth}{0.5pt} - } -} - -\fontfamily{cmss}\fontshape{n}\selectfont - -\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}} - -\pagestyle{myheadings} -%\thispagestyle{empty} use this with letterhead paper - -<%pagebreak 90 27 37%> -\end{tabular*} - -\newpage - -\markright{<%company%>\hfill <%invnumber%>} - -\vspace*{-12pt} - -\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}} - \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & - \textbf{Unit} & \textbf{Bin} \\ -<%end pagebreak%> - - -\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont - -\vspace*{2cm} - -<%shiptoname%> - -<%shiptostreet%> - -<%shiptozipcode%> - -<%shiptocity%> - -<%shiptocountry%> - -\vspace{3.5cm} - -\textbf{P A C K I N G} \parbox{0.3cm}{\hfill} \textbf{L I S T} - -\hfill -\begin{tabular}[t]{l@{\hspace{0.3cm}}l} - \textbf{Date} & <%invdate%> \\ - \textbf{Number} & <%invnumber%> \\ - \textbf{Customer} & <%customer_id%> -\end{tabular} - -\vspace{1cm} - -\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}} - \textbf{Number} & \textbf{Description} & \textbf{Qt'y} & - \textbf{Unit} & \textbf{Bin} \\ -<%foreach number%> - <%number%> & <%description%> & <%qty%> & - <%unit%> & <%bin%> \\ -<%end number%> -\end{tabular*} - - -\parbox{\textwidth}{ -\rule{\textwidth}{2pt} - -\vspace{12pt} - -<%if notes%> - <%notes%> -<%end if%> - -} - -\vfill -\centerline{\textbf{Thank You for your valued business!}} - -\renewcommand{\thefootnote}{\fnsymbol{footnote}} - -\footnotetext[1]{\tiny -Items returned are subject to a 10\% restocking charge. -A return authorization must be obtained from <%company%> before goods are -returned. Returns must be shipped prepaid and properly insured. -<%company%> will not be responsible for damages during transit.} - -\end{document} - diff --git a/templates/French-packing_list.html b/templates/French-packing_list.html deleted file mode 100644 index 10b05f08b..000000000 --- a/templates/French-packing_list.html +++ /dev/null @@ -1,152 +0,0 @@ -CTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional"> - - - - - -A2A <%invnumber%> <%name%> - - - - - - - - - - - -
- - - - - - - - - -
-

- <%company%> -
<%address%> -

-
-

L I S T E  D ' E N V O I

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Date de facture : <%invdate%>
Numéro de facture :<%invnumber%>
-
-
- - - - - - - - -
Adresse d'envoi
<%shiptoname%> -
<%shiptostreet%> -
<%shiptozipcode%> -
<%shiptocity%> -
-
-
- - - - - - - - -<%foreach number%> - - - - - - -<%end number%> - - - - - -
N°DescriptionQté 
<%number%><%description%><%qty%><%unit%>

-
- - -<%if notes%> - - -<%end notes%> - - - -
À noter :
<%notes%>
EXPÉDIÉ PAR : - <%shippingpoint%> -
-
- - - - - -
- - - X
-
-
- -
- - diff --git a/templates/French-packing_list.tex b/templates/French-packing_list.tex deleted file mode 100644 index 8aa14c4e0..000000000 --- a/templates/French-packing_list.tex +++ /dev/null @@ -1,125 +0,0 @@ -\documentclass[twoside]{scrartcl} -\usepackage[frame]{xy} -\usepackage[frenchb]{babel} -\usepackage[utf8]{inputenc} -\usepackage{tabularx} -\setlength{\voffset}{0.5cm} -\setlength{\hoffset}{-2.0cm} -\setlength{\topmargin}{0cm} -\setlength{\headheight}{0.5cm} -\setlength{\headsep}{1cm} -\setlength{\topskip}{0pt} -\setlength{\oddsidemargin}{1.0cm} -\setlength{\evensidemargin}{1.0cm} -\setlength{\textwidth}{19.2cm} -\setlength{\textheight}{24.5cm} -\setlength{\footskip}{1cm} -\setlength{\parindent}{0pt} -\renewcommand{\baselinestretch}{1} -\begin{document} - -\newlength{\descrwidth}\setlength{\descrwidth}{10cm} - -\newsavebox{\hdr} -\sbox{\hdr}{ - \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont - - \parbox{\textwidth}{ - \parbox[b]{12cm}{ - <%company%> - - <%address%>}\hfill - \begin{tabular}[b]{rr@{}} - Téléphone & <%tel%>\\ - Télécopieur & <%fax%> - \end{tabular} - - \rule[1.5ex]{\textwidth}{0.5pt} - } -} - -\fontfamily{cmss}\fontshape{n}\selectfont - -\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}} - -\pagestyle{myheadings} -%\thispagestyle{empty} use this with letterhead paper - -<%pagebreak 90 27 48%> -\end{tabular*} - -\newpage - -\markright{<%company%>\hfill <%invnumber%>} - -\vspace*{-12pt} - -\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}} - \textbf{Numéro} & \textbf{Description} & \textbf{Qté} & - \textbf{Unité} & \textbf{Bin} \\ -<%end pagebreak%> - - -\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont - -\vspace*{2cm} - -<%shiptoname%> - -<%shiptostreet%> - -<%shiptozipcode%> - -<%shiptocity%> - -<%shiptocountry%> - -\vspace{3.5cm} - -\textbf{L I S T E} \parbox{0.3cm}{\hfill} \textbf{D E} -\parbox{0.3cm}{\hfill} \textbf{P A Q U E T A G E} - -\hfill -\begin{tabular}[t]{l@{\hspace{0.3cm}}l} - \textbf{Date de facture} & <%invdate%> \\ - \textbf{Numéro de facture} & <%invnumber%> \\ - \textbf{Numéro de client} & <%customer_id%> -\end{tabular} - -\vspace{1cm} - -\begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rll@{}} - \textbf{Numéro} & \textbf{Description} & \textbf{Qté} & - \textbf{Unité} & \textbf{Bin} \\ -<%foreach number%> - <%number%> & <%description%> & <%qty%> & - <%unit%> & <%bin%> \\ -<%end number%> -\end{tabular*} - - -\parbox{\textwidth}{ -\rule{\textwidth}{2pt} - -\vspace{12pt} - -<%if notes%> - <%notes%> -<%end if%> - -} - -\vfill -\centerline{\textbf{Merci de faire affaire avec nous!}} - -\renewcommand{\thefootnote}{\fnsymbol{footnote}} - -\footnotetext[1]{\tiny -Les éléments retournés seront sujets à un supplément de remmagasinnage de -10\%. Une autorisation de renvoi doit être obtenue au préalable auprès de -<%company%>. Les frais de transports et d'assurance sur les éléments -retournés devront être couvert par le client de façon appropriée. -<%company%> ne peut être tenue responsable des dommages survenus pendant -le transit.} - -\end{document} diff --git a/templates/German-packing_list.html b/templates/German-packing_list.html deleted file mode 100644 index 3aa1e2eff..000000000 --- a/templates/German-packing_list.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - -
- - - - - - - - - -
-

- <%company%> -
<%address%> -

-
-

L I E F E R S C H E I N

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Datum <%invdate%>
Nummer<%invnumber%>
-
-
- - - - - - - - -
Zustellung an:
<%shiptoname%> -
<%shiptostreet%> -
<%shiptozipcode%> -
<%shiptocity%> -
<%shiptocountry%> -<%if shiptocontact%> -

An: <%shiptocontact%> -<%end shiptocontact%> - -

-
-
- - - - - - - - -<%foreach number%> - - - - - - -<%end number%> - - - - - -
NummerArtikelAnz 
<%number%><%description%><%qty%><%unit%>

-
- - -<%if notes%> - - -<%end notes%> - - - -
Bemerkungen<%notes%> - <%shippingpoint%> -
-
- - - - - -
- Beschädigte Waren und Waren ohne Rückgabenummer werden nicht - entgegengenommen. Lagerkosten werden mit 10% berrechnet. - Waren müssen ausreichended verpackt und versichert sein. - - - X
-
-
- -
- - - - diff --git a/templates/German-packing_list.tex b/templates/German-packing_list.tex deleted file mode 100644 index 0a568fcff..000000000 --- a/templates/German-packing_list.tex +++ /dev/null @@ -1,81 +0,0 @@ -\documentclass[twoside]{scrartcl} -\usepackage{tabularx} -\usepackage[utf8]{inputenc} -\begin{document} - -\thispagestyle{empty} - -\newlength{\descrwidth}\setlength{\descrwidth}{10cm} - -\fontfamily{cmss}\fontshape{n}\selectfont - -<%pagebreak 100 35 37%> -\end{tabularx} - -\newpage - -\begin{tabularx}{\textwidth}{lXr} - \hline - \textbf{Pos} & \textbf{Bezeichnung} & \textbf{Liefermenge} \\ - \hline -<%end pagebreak%> - -\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont - -\vspace*{1.5cm} - -\begin{minipage}{8cm} - <%name%> - - <%street%> - - <%zipcode%> <%city%> - - <%country%> -\end{minipage} -\hfill -\begin{minipage}{6cm} - \rightline{\LARGE\textbf{\textit{Lieferschein}}} - \rightline{\large\textbf{\textit{Nr. <%invnumber%>% - }}} - - Datum:\hfill <%invdate%> - - Auftrag-Nr:\hfill <%ordnumber%> - - Kunden-Nr:\hfill <%customernumber%> - - Ansprechpartner:\hfill <%employee%> -\end{minipage} - -\vspace*{0.5cm} - -Ihre Bestellung ex <%cusordnumber%> vom <%orddate%> -\hfill - -\vspace*{0.5cm} - -\begin{tabularx}{\textwidth}{lXr} - \hline - \textbf{Pos} & \textbf{Bezeichnung} & \textbf{Liefermenge} \\ - \hline -<%foreach number%> - <%runningnumber%> & \raggedright <%description%> & <%qty%> <%unit%>\\ -<%end number%> -\end{tabularx} - -\vspace{0.5cm} - -Liefertermin: <%deliverydate%> - -\vspace{0.5cm} - -Oben angeführte Positionen vollständig und ohne Mängel erhalten: -\vspace*{2.5cm} \\ -\parbox[t]{6cm}{ - \underline{\hspace*{6cm}}\\ - \centerline{\small Datum / Unterschrift} -} - -\end{document} - diff --git a/templates/Service-packing_list.html b/templates/Service-packing_list.html deleted file mode 100644 index 68ed2edea..000000000 --- a/templates/Service-packing_list.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - -
- - - - - - - - - -
-

- <%company%> -
<%address%> -

-
-

P A C K I N G    L I S T

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
Date <%invdate%>
Number<%invnumber%>
-
-
- - - - - - - - -
Ship To:
<%shiptoname%> -
<%shiptostreet%> -
<%shiptozipcode%> -
<%shiptocity%> -
<%shiptocountry%> -<%if shiptocontact%> -

Attn: <%shiptocontact%> -<%end shiptocontact%> - -

-
-
- - - - - - - - -<%foreach number%> - - - - - - -<%end number%> - - - - - -
NumberDescriptionQt'y 
<%number%><%description%><%qty%><%unit%>

-
- - -<%if notes%> - - -<%end notes%> - - - -
Notes
<%notes%>
- <%shippingpoint%> -
-
- - - - - -
- Items returned are subject to - a 10% restocking charge. A return authorization must be obtained - from <%company%> before goods are returned. Returns must be shipped - prepaid and properly insured. <%company%> will not be responsible - for damages during transit. - - - X
-
-
- -
- - - - diff --git a/templates/Service-packing_list.tex b/templates/Service-packing_list.tex deleted file mode 100644 index e967f785d..000000000 --- a/templates/Service-packing_list.tex +++ /dev/null @@ -1,120 +0,0 @@ -\documentclass[twoside]{scrartcl} -\usepackage[frame]{xy} -\usepackage{tabularx} -\usepackage[utf8]{inputenc} -\setlength{\voffset}{0.5cm} -\setlength{\hoffset}{-2.0cm} -\setlength{\topmargin}{0cm} -\setlength{\headheight}{0.5cm} -\setlength{\headsep}{1cm} -\setlength{\topskip}{0pt} -\setlength{\oddsidemargin}{1.0cm} -\setlength{\evensidemargin}{1.0cm} -\setlength{\textwidth}{19.2cm} -\setlength{\textheight}{24.5cm} -\setlength{\footskip}{1cm} -\setlength{\parindent}{0pt} -\renewcommand{\baselinestretch}{1} -\begin{document} - -\newlength{\descrwidth}\setlength{\descrwidth}{10cm} - -\newsavebox{\hdr} -\sbox{\hdr}{ - \fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont - - \parbox{\textwidth}{ - \parbox[b]{12cm}{ - <%company%> - - <%address%>}\hfill - \begin{tabular}[b]{rr@{}} - Telephone & <%tel%>\\ - Facsimile & <%fax%> - \end{tabular} - - \rule[1.5ex]{\textwidth}{0.5pt} - } -} - -\fontfamily{cmss}\fontshape{n}\selectfont - -\markboth{<%company%>\hfill <%invnumber%>}{\usebox{\hdr}} - -\pagestyle{myheadings} -%\thispagestyle{empty} use this with letterhead paper - -<%pagebreak 90 27 48%> -\end{tabular*} - -\newpage - -\markright{<%company%>\hfill <%invnumber%>} - -\vspace*{-12pt} - -\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rl@{}} - \textbf{Description} & \textbf{Qt'y} & - \textbf{Unit} \\ -<%end pagebreak%> - - -\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont - -\vspace*{2cm} - -<%shiptoname%> - -<%shiptostreet%> - -<%shiptozipcode%> - -<%shiptocity%> - -<%shiptocountry%> - -\vspace{3.5cm} - -\textbf{P A C K I N G} \parbox{0.3cm}{\hfill} \textbf{L I S T} - -\hfill -\begin{tabular}[t]{l@{\hspace{0.3cm}}l} - \textbf{Date} & <%invdate%> \\ - \textbf{Number} & <%invnumber%> \\ - \textbf{Customer} & <%customer_id%> -\end{tabular} - -\vspace{1cm} - -\begin{tabular*}{\textwidth}{@{}p{\descrwidth}@{\extracolsep\fill}rl@{}} - \textbf{Description} & \textbf{Qt'y} & \textbf{Unit} \\ -<%foreach number%> - <%description%> & <%qty%> & <%unit%> \\ -<%end number%> -\end{tabular*} - - -\parbox{\textwidth}{ -\rule{\textwidth}{2pt} - -\vspace{12pt} - -<%if notes%> - <%notes%> -<%end if%> - -} - -%\vfill -%\centerline{\textbf{Thank You for your valued business!}} - -%\renewcommand{\thefootnote}{\fnsymbol{footnote}} - -%\footnotetext[1]{\tiny -%Items returned are subject to a 10\% restocking charge. -%A return authorization must be obtained from <%company%> before goods are -%returned. Returns must be shipped prepaid and properly insured. -%<%company%> will not be responsible for damages during transit.} - -\end{document} -