Skip to content

Commit

Permalink
1. Version 2.8.13
Browse files Browse the repository at this point in the history
   2. added subject, message and inline/attachment option to batch email
   3. removed extra line when "Ship all" was clicked
   4. added missing customer number to generate sales order list
   5. fixed foreign exchange gain/loss calculation when exchange rate is 1
   6. added company name to title line for account detail report
   7. updated German and Swiss German translations

	modified:   SL/CA.pm
	modified:   SL/CP.pm
	modified:   SL/Form.pm
	modified:   VERSION
	modified:   bin/lynx/bp.pl
	modified:   bin/lynx/ca.pl
	modified:   bin/lynx/cp.pl
	modified:   bin/lynx/ct.pl
	modified:   bin/lynx/ic.pl
	modified:   bin/lynx/io.pl
	modified:   bin/lynx/oe.pl
	modified:   bin/lynx/pe.pl
	modified:   bin/mozilla/bp.pl
	modified:   bin/mozilla/ca.pl
	modified:   bin/mozilla/cp.pl
	modified:   bin/mozilla/ct.pl
	modified:   bin/mozilla/ic.pl
	modified:   bin/mozilla/io.pl
	modified:   bin/mozilla/oe.pl
	modified:   bin/mozilla/pe.pl
	renamed:    doc/UPGRADE-2.8.7-2.8.12 -> doc/UPGRADE-2.8.7-2.8.13
  • Loading branch information
ledger123 committed Sep 26, 2008
1 parent 82a9a90 commit 3a20135
Show file tree
Hide file tree
Showing 140 changed files with 4,550 additions and 1,380 deletions.
2 changes: 1 addition & 1 deletion SL/CA.pm
Expand Up @@ -86,7 +86,7 @@ sub all_transactions {
my $dbh = $form->dbconnect($myconfig);


my %defaults = $form->get_defaults($dbh, \@{['precision']});
my %defaults = $form->get_defaults($dbh, \@{['precision', 'company']});
for (keys %defaults) { $form->{$_} = $defaults{$_} }

# get chart_id
Expand Down
23 changes: 11 additions & 12 deletions SL/CP.pm
Expand Up @@ -814,20 +814,19 @@ sub post_payment {
.$dbh->quote($form->{source}).qq|, '$approved',
$voucherid)|;
$dbh->do($query) || $form->dberror($query);

# gain/loss
$amount = $form->round_amount(($form->round_amount($form->{"paid_$i"} * $trans{$form->{"id_$i"}}{exchangerate}, $form->{precision}) - $form->round_amount($form->{"paid_$i"} * $form->{exchangerate}, $form->{precision})) * $ml * -1, $form->{precision});
if ($amount) {
my $accno_id = ($amount > 0) ? $defaults{fxgain_accno_id} : $defaults{fxloss_accno_id};
$query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
amount, fx_transaction, approved, vr_id)
VALUES ($form->{"id_$i"}, $accno_id,
'$form->{datepaid}', $amount, '1', '$approved',
$voucherid)|;
$dbh->do($query) || $form->dberror($query);
}
}

# gain/loss
$amount = $form->round_amount(($form->round_amount($form->{"paid_$i"} * $trans{$form->{"id_$i"}}{exchangerate}, $form->{precision}) - $form->round_amount($form->{"paid_$i"} * $form->{exchangerate}, $form->{precision})) * $ml * -1, $form->{precision});
if ($amount) {
my $accno_id = ($amount > 0) ? $defaults{fxgain_accno_id} : $defaults{fxloss_accno_id};
$query = qq|INSERT INTO acc_trans (trans_id, chart_id, transdate,
amount, fx_transaction, approved, vr_id)
VALUES ($form->{"id_$i"}, $accno_id,
'$form->{datepaid}', $amount, '1', '$approved',
$voucherid)|;
$dbh->do($query) || $form->dberror($query);
}

# deduct tax for cash discount
if ($form->{"discount_$i"}) {
Expand Down
2 changes: 1 addition & 1 deletion SL/Form.pm
Expand Up @@ -78,7 +78,7 @@ sub new {

$self->{menubar} = 1 if $self->{path} =~ /lynx/i;

$self->{version} = "2.8.12";
$self->{version} = "2.8.13";
$self->{dbversion} = "2.8.8";

bless $self, $type;
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.8.12
2.8.13
29 changes: 24 additions & 5 deletions bin/lynx/bp.pl
Expand Up @@ -393,7 +393,7 @@ sub print {

for (qw(id vc)) { $form->{$_} = $myform->{"${_}_$i"} }
$form->{script} = qq|$myform->{"module_$i"}.pl|;
for (qw(login path media sendmode format type header)) { $form->{$_} = $myform->{$_} }
for (qw(login path media sendmode subject message format type header)) { $form->{$_} = $myform->{$_} }

do "$form->{path}/$form->{script}";

Expand Down Expand Up @@ -804,13 +804,12 @@ sub list_spool {
$selectformat = "";
$media = qq|<select name=media>|;

$form->{format} ||= $myconfig{outputformat};

if ($form->{batch} eq 'email') {
$form->{format} ||= "pdf";
$selectformat .= qq|
<option value="html">|.$locale->text('html');
} else {
$form->{format} ||= $myconfig{outputformat};
$form->{media} ||= $myconfig{printer};
$form->{format} ||= "postscript";
exit if (! $latex && $form->{batch} eq 'print');
Expand All @@ -835,23 +834,41 @@ sub list_spool {

}

$form->{SM}{attachment} = "selected" if $form->{sendmode} eq 'attachment';
$form->{SM}{inline} = "selected" if $form->{sendmode} eq 'inline';

if ($form->{batch} eq 'email') {
$sendmode = qq|<select name="sendmode">
<option value="attachment" $form->{SM}{attachment}>|.$locale->text('Attachment').qq|
<option value="inline" $form->{SM}{inline}>|.$locale->text('In-line').qq|</select>|;
}

if ($form->{batch} ne 'email') {
$media .= qq|
<option value="queue">|.$locale->text('Queue') if $form->{batch} eq 'print';
}

$media .= qq|</select>|;

$sendmode =~ s/(<option value="\Q$form->{sendmode}\E")/$1 selected/;
$sendmode = qq|<td>$sendmode</td>|;

$media =~ s/(<option value="\Q$form->{media}\E")/$1 selected/;
$media = qq|<td>$media</td>|;

$format = qq|<select name=format>$selectformat</select>|;
$format =~ s/(<option value="\Q$form->{format}\E")/$1 selected/;
$format = qq|<td>$format</td>|;
$format = qq|<td width=1%>$format</td>|;

if ($form->{batch} eq 'email') {
$message = qq|<tr>
<td colspan=2 nowrap><b>|.$locale->text('Subject').qq|</b>&nbsp;<input name=subject size=30></td>
</tr>
<tr>
<td colspan=2><b>|.$locale->text('Message').qq|<br><textarea name=message rows=15 cols=60 wrap=soft>$form->{message}</textarea></td>
</tr>|;

$media = qq|<input type="hidden" name="media" value="email">
<input type="hidden" name="sendmode" value="attachment">
|;
}
if ($form->{batch} eq 'queue') {
Expand All @@ -863,8 +880,10 @@ sub list_spool {

print qq|
<table>
$message
<tr>
$format
$sendmode
$media
$copies
</tr>
Expand Down
2 changes: 1 addition & 1 deletion bin/lynx/ca.pl
Expand Up @@ -286,7 +286,7 @@ sub list_transactions {

$form->{title} = ($form->{accounttype} eq 'gifi') ? $locale->text('GIFI') : $locale->text('Account');

$form->{title} .= " $form->{accno} - $form->{description}";
$form->{title} .= " $form->{accno} - $form->{description} / $form->{company}";

if ($form->{department}) {
($department) = split /--/, $form->{department};
Expand Down
1 change: 1 addition & 0 deletions bin/lynx/cp.pl
Expand Up @@ -162,6 +162,7 @@ sub payment {
if ($myconfig{vclimit} > 0) {
$form->{"all_$form->{vc}"} = $form->{name_list};
}
$form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id} if @{ $form->{"all_$form->{vc}"} };
}

$form->{"select$form->{vc}"} = "";
Expand Down
11 changes: 2 additions & 9 deletions bin/lynx/ct.pl
Expand Up @@ -853,17 +853,10 @@ sub list_names {
$column_header{quototal} = qq|<th class=listheading>$total</th>|;


# $locale->text('Customers')
# $locale->text('Vendors')
# $locale->text('Customer Transactions')
# $locale->text('Vendor Transactions')

if ($form->{status}) {
$label = "${vcname}s";
$form->{title} = $locale->text($label);
$form->{title} = ($form->{db} eq 'customer') ? $locale->text('Customers') : $locale->text('Vendors');
} else {
$label = $vcname;
$form->{title} = $locale->text($label ." Transactions");
$form->{title} = ($form->{db} eq 'customer') ? $locale->text('Customer Transactions') : $locale->text('Vendor Transactions');
}

$title = "$form->{title} / $form->{company}";
Expand Down
8 changes: 7 additions & 1 deletion bin/lynx/ic.pl
Expand Up @@ -61,8 +61,11 @@ sub edit {
# $locale->text('Edit Part')
# $locale->text('Edit Service')
# $locale->text('Edit Assembly')
# $locale->text('Assembly Changeup')
# $locale->text('Edit Labor/Overhead')
# $locale->text('Part Changeup')
# $locale->text('Service Changeup')
# $locale->text('Assembly Changeup')
# $locale->text('Labor/Overhead Changeup')

IC->get_part(\%myconfig, \%$form);

Expand Down Expand Up @@ -1038,6 +1041,9 @@ sub search {
# $locale->text('Assemblies')
# $locale->text('Components')
# $locale->text('Changeup Assemblies')
# $locale->text('Changeup Parts')
# $locale->text('Changeup Services')
# $locale->text('Changeup Labor/Overhead')

if ($form->{changeup}) {
$form->{title} = $locale->text('Changeup' . ' ' .$title{$form->{searchitems}});
Expand Down
4 changes: 3 additions & 1 deletion bin/lynx/io.pl
Expand Up @@ -939,13 +939,15 @@ sub invoicetotal {
$form->{oldinvtotal} += $amount;
}

$form->{oldinvtotal} = $form->round_amount($form->{oldinvtotal}, $form->{precision});

if ($form->{taxincluded}) {
$netamount = $form->{oldinvtotal};
for (split / /, $form->{taxaccounts}) { $netamount -= ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
$form->{cd_available} = $form->round_amount($netamount * $form->{cashdiscount} / 100, $form->{precision});
} else {
$form->{cd_available} = $form->round_amount($form->{oldinvtotal} * $form->{cashdiscount} / 100, $form->{precision});
for (split / /, $form->{taxaccounts}) { $form->{oldinvtotal} += ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
for (split / /, $form->{taxaccounts}) { $form->{oldinvtotal} += $form->round_amount($form->{"${_}_base"} * $form->{"${_}_rate"}, $form->{precision}) }
}

$form->{oldtotalpaid} = 0;
Expand Down
2 changes: 2 additions & 0 deletions bin/lynx/oe.pl
Expand Up @@ -852,6 +852,8 @@ sub ship_all {
$form->{"ship_$_"} = $form->{"qty_$_"};
}

$form->{rowcount}--;

&display_form;

}
Expand Down
3 changes: 2 additions & 1 deletion bin/lynx/pe.pl
Expand Up @@ -2447,7 +2447,7 @@ sub select_customer {
last if ($ok = $form->{"ndx_$_"});
}

$form->error($locale->text('Nothing selected!')) unless $ok;
$form->error($locale->text('All selected!')) unless $ok;

$label = ($form->{vc} eq 'customer') ? $locale->text('Customer') : $locale->text('Vendor');

Expand Down Expand Up @@ -2509,6 +2509,7 @@ sub sales_order_header {
if ($form->{"ndx_$_"}) {
$form->{"$form->{vc}_id_$_"} = $form->{"$form->{vc}_id"};
$form->{"$form->{vc}_$_"} = $form->{"$form->{vc}"};
$form->{"$form->{vc}number_$_"} = $form->{"$form->{vc}number"};
}
}

Expand Down
29 changes: 24 additions & 5 deletions bin/mozilla/bp.pl
Expand Up @@ -393,7 +393,7 @@ sub print {

for (qw(id vc)) { $form->{$_} = $myform->{"${_}_$i"} }
$form->{script} = qq|$myform->{"module_$i"}.pl|;
for (qw(login path media sendmode format type header)) { $form->{$_} = $myform->{$_} }
for (qw(login path media sendmode subject message format type header)) { $form->{$_} = $myform->{$_} }

do "$form->{path}/$form->{script}";

Expand Down Expand Up @@ -804,13 +804,12 @@ sub list_spool {
$selectformat = "";
$media = qq|<select name=media>|;

$form->{format} ||= $myconfig{outputformat};

if ($form->{batch} eq 'email') {
$form->{format} ||= "pdf";
$selectformat .= qq|
<option value="html">|.$locale->text('html');
} else {
$form->{format} ||= $myconfig{outputformat};
$form->{media} ||= $myconfig{printer};
$form->{format} ||= "postscript";
exit if (! $latex && $form->{batch} eq 'print');
Expand All @@ -835,23 +834,41 @@ sub list_spool {

}

$form->{SM}{attachment} = "selected" if $form->{sendmode} eq 'attachment';
$form->{SM}{inline} = "selected" if $form->{sendmode} eq 'inline';

if ($form->{batch} eq 'email') {
$sendmode = qq|<select name="sendmode">
<option value="attachment" $form->{SM}{attachment}>|.$locale->text('Attachment').qq|
<option value="inline" $form->{SM}{inline}>|.$locale->text('In-line').qq|</select>|;
}

if ($form->{batch} ne 'email') {
$media .= qq|
<option value="queue">|.$locale->text('Queue') if $form->{batch} eq 'print';
}

$media .= qq|</select>|;

$sendmode =~ s/(<option value="\Q$form->{sendmode}\E")/$1 selected/;
$sendmode = qq|<td>$sendmode</td>|;

$media =~ s/(<option value="\Q$form->{media}\E")/$1 selected/;
$media = qq|<td>$media</td>|;

$format = qq|<select name=format>$selectformat</select>|;
$format =~ s/(<option value="\Q$form->{format}\E")/$1 selected/;
$format = qq|<td>$format</td>|;
$format = qq|<td width=1%>$format</td>|;

if ($form->{batch} eq 'email') {
$message = qq|<tr>
<td colspan=2 nowrap><b>|.$locale->text('Subject').qq|</b>&nbsp;<input name=subject size=30></td>
</tr>
<tr>
<td colspan=2><b>|.$locale->text('Message').qq|<br><textarea name=message rows=15 cols=60 wrap=soft>$form->{message}</textarea></td>
</tr>|;

$media = qq|<input type="hidden" name="media" value="email">
<input type="hidden" name="sendmode" value="attachment">
|;
}
if ($form->{batch} eq 'queue') {
Expand All @@ -863,8 +880,10 @@ sub list_spool {

print qq|
<table>
$message
<tr>
$format
$sendmode
$media
$copies
</tr>
Expand Down
2 changes: 1 addition & 1 deletion bin/mozilla/ca.pl
Expand Up @@ -286,7 +286,7 @@ sub list_transactions {

$form->{title} = ($form->{accounttype} eq 'gifi') ? $locale->text('GIFI') : $locale->text('Account');

$form->{title} .= " $form->{accno} - $form->{description}";
$form->{title} .= " $form->{accno} - $form->{description} / $form->{company}";

if ($form->{department}) {
($department) = split /--/, $form->{department};
Expand Down
1 change: 1 addition & 0 deletions bin/mozilla/cp.pl
Expand Up @@ -162,6 +162,7 @@ sub payment {
if ($myconfig{vclimit} > 0) {
$form->{"all_$form->{vc}"} = $form->{name_list};
}
$form->{"$form->{vc}_id"} = $form->{"all_$form->{vc}"}->[0]->{id} if @{ $form->{"all_$form->{vc}"} };
}

$form->{"select$form->{vc}"} = "";
Expand Down
11 changes: 2 additions & 9 deletions bin/mozilla/ct.pl
Expand Up @@ -853,17 +853,10 @@ sub list_names {
$column_header{quototal} = qq|<th class=listheading>$total</th>|;


# $locale->text('Customers')
# $locale->text('Vendors')
# $locale->text('Customer Transactions')
# $locale->text('Vendor Transactions')

if ($form->{status}) {
$label = "${vcname}s";
$form->{title} = $locale->text($label);
$form->{title} = ($form->{db} eq 'customer') ? $locale->text('Customers') : $locale->text('Vendors');
} else {
$label = $vcname;
$form->{title} = $locale->text($label ." Transactions");
$form->{title} = ($form->{db} eq 'customer') ? $locale->text('Customer Transactions') : $locale->text('Vendor Transactions');
}

$title = "$form->{title} / $form->{company}";
Expand Down
8 changes: 7 additions & 1 deletion bin/mozilla/ic.pl
Expand Up @@ -61,8 +61,11 @@ sub edit {
# $locale->text('Edit Part')
# $locale->text('Edit Service')
# $locale->text('Edit Assembly')
# $locale->text('Assembly Changeup')
# $locale->text('Edit Labor/Overhead')
# $locale->text('Part Changeup')
# $locale->text('Service Changeup')
# $locale->text('Assembly Changeup')
# $locale->text('Labor/Overhead Changeup')

IC->get_part(\%myconfig, \%$form);

Expand Down Expand Up @@ -1038,6 +1041,9 @@ sub search {
# $locale->text('Assemblies')
# $locale->text('Components')
# $locale->text('Changeup Assemblies')
# $locale->text('Changeup Parts')
# $locale->text('Changeup Services')
# $locale->text('Changeup Labor/Overhead')

if ($form->{changeup}) {
$form->{title} = $locale->text('Changeup' . ' ' .$title{$form->{searchitems}});
Expand Down
4 changes: 3 additions & 1 deletion bin/mozilla/io.pl
Expand Up @@ -939,13 +939,15 @@ sub invoicetotal {
$form->{oldinvtotal} += $amount;
}

$form->{oldinvtotal} = $form->round_amount($form->{oldinvtotal}, $form->{precision});

if ($form->{taxincluded}) {
$netamount = $form->{oldinvtotal};
for (split / /, $form->{taxaccounts}) { $netamount -= ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
$form->{cd_available} = $form->round_amount($netamount * $form->{cashdiscount} / 100, $form->{precision});
} else {
$form->{cd_available} = $form->round_amount($form->{oldinvtotal} * $form->{cashdiscount} / 100, $form->{precision});
for (split / /, $form->{taxaccounts}) { $form->{oldinvtotal} += ($form->{"${_}_base"} * $form->{"${_}_rate"}) }
for (split / /, $form->{taxaccounts}) { $form->{oldinvtotal} += $form->round_amount($form->{"${_}_base"} * $form->{"${_}_rate"}, $form->{precision}) }
}

$form->{oldtotalpaid} = 0;
Expand Down
2 changes: 2 additions & 0 deletions bin/mozilla/oe.pl
Expand Up @@ -852,6 +852,8 @@ sub ship_all {
$form->{"ship_$_"} = $form->{"qty_$_"};
}

$form->{rowcount}--;

&display_form;

}
Expand Down

0 comments on commit 3a20135

Please sign in to comment.