[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5781] trunk
- Subject: SF.net SVN: ledger-smb:[5781] trunk
- From: ..hidden..
- Date: Mon, 13 May 2013 09:39:05 +0000
Revision: 5781
http://sourceforge.net/p/ledger-smb/code/5781
Author: einhverfr
Date: 2013-05-13 09:39:03 +0000 (Mon, 13 May 2013)
Log Message:
-----------
Envelope/shipping label support
Modified Paths:
--------------
trunk/Changelog
trunk/bin/io.pl
trunk/bin/is.pl
Added Paths:
-----------
trunk/templates/demo/envelope.tex
trunk/templates/demo/shipping_label.tex
Modified: trunk/Changelog
===================================================================
--- trunk/Changelog 2013-05-12 12:29:23 UTC (rev 5780)
+++ trunk/Changelog 2013-05-13 09:39:03 UTC (rev 5781)
@@ -13,6 +13,7 @@
* Partsgroups can now be nested though this is not yet used by LSMB (Chris T)
* Session expiration now with configurable behavior (Chris T)
* Timecard system generalized to allow labor and materials cards too (Chris T)
+* Can now print envelopes or shipping labels from many screens (Chris T)
Enhancing data integrity
* No longer allow NULL amounts in acc_trans (Chris T)
Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl 2013-05-12 12:29:23 UTC (rev 5780)
+++ trunk/bin/io.pl 2013-05-13 09:39:03 UTC (rev 5781)
@@ -1410,6 +1410,14 @@
value => 'bin_list',
};
}
+ push @{$options{formname}{options}}, {
+ text => $locale->text('Envelope'),
+ value => 'envelope',
+ };
+ push @{$options{formname}{options}}, {
+ text => $locale->text('Shipping Label'),
+ value => 'shipping_label',
+ };
if ( $form->{media} eq 'email' ) {
$options{media} = {
@@ -1630,7 +1638,12 @@
$numberfld = "rfqnumber";
$order = 1;
}
+ if (($form->{formname} eq 'envelope')
+ or ($form->{formname} eq 'shipping_label')){
+ $inv = undef;
+ }
+
if ($form->test_should_get_images){
my $file = LedgerSMB::File->new();
$file->new_dbobject({base => $form, locale => $locale});
@@ -1657,7 +1670,6 @@
$form->{parts_files} = \%parts_files;
$form->{file_path} = $file->file_path;
}
-
&validate_items;
$form->{"${inv}date"} = $form->{transdate};
@@ -1668,7 +1680,7 @@
$locale->text( $form->{label} . ' Date missing!' ) );
# get next number
- if ( !$form->{"${inv}number"} ) {
+ if ( !$form->{"${inv}number"} and $inv) {
$form->{"${inv}number"} =
$form->update_defaults( \%myconfig, $numberfld );
if ( $form->{media} eq 'screen' ) {
Modified: trunk/bin/is.pl
===================================================================
--- trunk/bin/is.pl 2013-05-12 12:29:23 UTC (rev 5780)
+++ trunk/bin/is.pl 2013-05-13 09:39:03 UTC (rev 5781)
@@ -935,7 +935,9 @@
my $formname = { name => 'formname',
options => [
{text=> $locale->text('Sales Invoice'), value => 'invoice'},
- {text=> $locale->text('Packing List'), value => 'packing_list'},
+ {text=> $locale->text('Packing List'), value => 'packing_list'},
+ {text=> $locale->text('Envelope'), value => 'envelope'},
+ {text=> $locale->text('Shipping Label'), value=> 'shipping_label'},
]
};
print_select($form, $formname);
Added: trunk/templates/demo/envelope.tex
===================================================================
--- trunk/templates/demo/envelope.tex (rev 0)
+++ trunk/templates/demo/envelope.tex 2013-05-13 09:39:03 UTC (rev 5781)
@@ -0,0 +1,16 @@
+<?lsmb FILTER latex ?>
+\documentclass{scrartcl}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\usepackage[paperheight=11cm, paperwidth=23cm,top=3.5cm,bottom=3cm,left=12cm,right=1cm]{geometry}
+\begin{document}
+\thispagestyle{empty}
+\noindent <?lsmb name ?>\\
+<?lsmb address1 ?> \\
+<?lsmb- IF address2 ?>
+<?lsmb address2 ?> \\
+<?lsmb- END ?>
+<?lsmb city ?>
+<?lsmb- IF state -?>, <?lsmb state ?> <?lsmb END ?> <?lsmb zipcode ?>\\
+\end{document}
+<?lsmb END ?>
Added: trunk/templates/demo/shipping_label.tex
===================================================================
--- trunk/templates/demo/shipping_label.tex (rev 0)
+++ trunk/templates/demo/shipping_label.tex 2013-05-13 09:39:03 UTC (rev 5781)
@@ -0,0 +1,24 @@
+<?lsmb FILTER latex ?>
+\documentclass{scrartcl}
+\usepackage[latin1]{inputenc}
+\usepackage{tabularx}
+\usepackage[paperheight=10.5cm, paperwidth=16.2cm,top=1cm,bottom=1.5cm,left=2cm,right=2cm]{geometry}
+\begin{document}
+<?lsmb IF shiptoaddress1 ?>
+\noindent <?lsmb name ?>\\
+<?lsmb shiptoaddress1 ?>\\
+<?lsmb IF shiptoaddress2; shiptoaddress2 ?>\\ <?lsmb END ?>
+<?lsmb- shiptocity ?>
+<?lsmb IF shiptostate -?>
+\hspace{-0.1cm}, <?lsmb shiptostate ?><?lsmb END ?> <?lsmb shiptozipcode ?>\\
+<?lsmb shiptocountry ?>
+<?lsmb ELSE ?>
+\noindent <?lsmb name ?>\\
+<?lsmb address1 ?> \\
+<?lsmb- IF address2; address2 ?> \\<?lsmb END ?>
+<?lsmb- city ?>
+<?lsmb- IF state -?>, <?lsmb state ?> <?lsmb END ?> <?lsmb zipcode ?>\\
+<?lsmb END ?>
+
+\end{document}
+<?lsmb END ?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.