scroll_into_view => 1, # $(<TARGET>)[0].scrollIntoView()
);
+my %trim_target_for = map { ($_ => 1) } qw(insertAfter insertBefore appendTo prependTo);
+
sub AUTOLOAD {
our $AUTOLOAD;
$method = (delete($self->{_prefix}) || '') . $method;
my $num_args = $supported_methods{$method};
- croak "Unsupported jQuery action: $method" unless defined $num_args;
+ croak "Unsupported jQuery action: $method" unless defined $num_args;
if ($num_args > 0) {
- croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted: $num_args)" if scalar(@args) != $num_args;
+ croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted: $num_args)" if scalar(@args) != $num_args;
} else {
$num_args *= -1;
croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted at least: $num_args)" if scalar(@args) < $num_args;
}
foreach my $idx (0..$num_args - 1) {
- # Force flattening from SL::Presenter::EscapedText and trim leading whitespace for scalars
- $args[$idx] = "" . $args[$idx] if ref($args[$idx]) eq 'SL::Presenter::EscapedText';
+ # Force flattening from SL::Presenter::EscapedText.
+ $args[$idx] = "" . $args[$idx] if ref($args[$idx]) eq 'SL::Presenter::EscapedText';
}
+ # Trim leading whitespaces for certain jQuery functions that operate
+ # on HTML code: $("<p>test</p>").appendTo('#some-id'). jQuery croaks
+ # on leading whitespaces, e.g. on $(" <p>test</p>").
+ $args[0] =~ s{^\s+}{} if $trim_target_for{$method};
+
push @{ $self->_actions }, [ $method, @args ];
return $self;
use SL::DB::Draft;
use SL::DB::BankAccount;
use SL::Presenter;
-use SL::DB::Helper::Payment qw(validate_payment_type);
use List::Util qw(max);
use Rose::Object::MakeMethods::Generic
my $all_open_ar_invoices = SL::DB::Manager::Invoice->get_all(where => \@where_sale, with_objects => 'customer');
my $all_open_ap_invoices = SL::DB::Manager::PurchaseInvoice->get_all(where => \@where_purchase, with_objects => 'vendor');
- my @all_open_invoices;
- # filter out subcent differences from ap invoices
+ my @all_open_invoices = @{ $all_open_ar_invoices };
+ # add ap invoices, filtering out subcent open amounts
push @all_open_invoices, grep { abs($_->amount - $_->paid) >= 0.01 } @{ $all_open_ap_invoices };
@all_open_invoices = sort { $a->id <=> $b->id } @all_open_invoices;
my $payment_type;
if ( defined $skonto_hash->{"$bt_id"} ) {
$payment_type = shift(@{ $skonto_hash->{"$bt_id"} });
- SL::DB::Helper::Payment->validate_payment_type($payment_type);
} else {
$payment_type = 'without_skonto';
};
$form->{action} = 'edit';
$form->{script} = 'is.pl';
$form->{saved_message} = $form->{label} . " $form->{invnumber} " . $locale->text('posted!');
- $form->{callback} = build_std_url(qw(action edit id saved_message));
+ $form->{callback} = build_std_url(qw(action edit id callback saved_message));
$form->redirect;
}
height: 2px;
}
-/* I.E. & Chrome können das nicht! */
+/* I.E. & Chrome können das nicht! */
/* input[type="radio"], input[type="checkbox"]{
width:1.15em;
height:1.15em;
border: 2px solid #FE5F14;
/* border-bottom: medium solid #FE5F14; */
}
-/* Fängt den "Schrink" beim focus - problem für i.e. und chrome */
+/* Fängt den "Schrink" beim focus - problem für i.e. und chrome */
/* input[type="radio"]:focus, input[type="checkbox"]:focus{
width:1.2em;
height:1.2em;
<title>Blöcke, bedingte Anweisungen und Schleifen</title>
<sect3 id="dokumentenvorlagen-und-variablen.bloecke.einfuehrung">
- <title>Einfürhung</title>
+ <title>Einführung</title>
<para>Der Parser kennt neben den Variablen einige weitere
Konstrukte, die gesondert behandelt werden. Diese sind wie
auf Ungleichheit getestet.</para>
<para>Erfahrere Benutzer können neben der Tests auf (Un-)Gleichheit
- auch Tests auf übereinstimmung mit regulären Ausdrücken ohne
+ auch Tests auf Ã\9cbereinstimmung mit regulären Ausdrücken ohne
Berücksichtung der Groß- und Kleinschreibung durchführen. Dazu dient
dieselbe Syntax wie oben nur mit <function>=~</function> und
<function>!~</function> als Vergleichsoperatoren.</para>
-\documentclass[twoside]{scrartcl}
-\usepackage{eurosym}
-\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}
-\begin{document}
-
-\thispagestyle{empty}
+\input{inheaders.tex}
-\newlength{\descrwidth}\setlength{\descrwidth}{10cm}
-\setlength{\parindent}{0cm}
-\fontfamily{cmss}\fontshape{n}\selectfont
+% Variablen, die in settings verwendet werden
+\newcommand{\lxlangcode} {<%template_meta.language.template_code%>}
+\newcommand{\lxmedia} {<%media%>}
+\newcommand{\lxcurrency} {<%currency%>}
+\newcommand{\lxtitlebar} {<%titlebar%>}
-<%pagebreak 80 28 37%>
-\end{tabularx}
+% settings: Einstellungen, Logo, Briefpapier, Kopfzeile, Fusszeile
+\input{insettings.tex}
-\newpage
+% laufende Kopfzeile:
+%\ourhead{}{}{<%subject%>}{<%letternumber%>}{<%date%>}
+\ourhead{}{}{}{}{}
-%\begin{tabularx}{\textwidth}{lrXrr}
-% \hline
-% \textbf{Pos} & \textbf{Menge} & \textbf{Bezeichnung} &
-% \textbf{E-Preis/\euro} & \textbf{G-Preis/\euro} \\
-% \hline
-% <%foreach number%>
-% <%runningnumber%> & <%qty%> <%unit%> & \raggedright <%description%> &
-% <%sellprice%> & <%linetotal%>\\
-% <%end number%>
-%<%end pagebreak%>
+\begin{document}
\fontfamily{cmss}\fontsize{10pt}{12pt}\selectfont
<%country%>
\end{minipage}
-\hfill
-\begin{minipage}{6cm}
-\end{minipage}
\vspace{2.5cm}
-
-\begin{minipage}{14cm}
-
+\hfill<%date%>
\textbf{<%reference%>}
\vspace{1cm}
<%company_name%>
-\end{minipage}
-\hfill
-\begin{minipage}{6cm}
- <%date%>
-
-\vspace{5cm}
-
-Anlagen | Attch.:
-\end{minipage}
-
\vspace*{0.5cm}
\begin{minipage}{6cm}
-\textbf{<%employee%>}
+\textbf{<%employee_name%>}
<%employee_position%>
\end{minipage}
\begin{minipage}{6cm}
-\textbf{<%salesman%>}
+\textbf{<%salesman_name%>}
<%salesman_position%>
\begin{minipage}{8cm}
\vspace*{1.0cm}
- <%shiptoname%>
+ <%name%>
- <%shiptostreet%>
+ <%street%>
- <%shiptozipcode%> <%shiptocity%>
+ <%zipcode%> <%city%>
- <%shiptocountry%>
+ <%country%>
\end{minipage}
\hfill
\begin{minipage}{6cm}
\begin{minipage}[t]{8cm}
\vspace*{1.0cm}
- <%shiptoname%>
+ <%name%>
- <%shiptostreet%>
+ <%street%>
- <%shiptozipcode%> <%shiptocity%>
+ ~
- <%shiptocountry%>
+ <%zipcode%> <%city%>
+
+ <%country%>
\end{minipage}
\hfill
\begin{minipage}[t]{6cm}
[% END %]
[% END %]
+ [% IF callback %]
+ <a href="[% callback %]">[% 'back' | $T8 %]</a>
+ [% END %]
+
<input type="hidden" name="rowcount" value="[% rowcount %]">
<input type="hidden" name="callback" value="[% callback | html %]">
<input type="hidden" name="draft_id" value="[% draft_id %]">