SQL-Ledger Homepage

SQL-Ledger User Forum

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Gregory West(R)

E-mail

Manitoba Canada,
03.08.2015, 11:08
 

Having Invoices / Sales Orders default to group by project (General)

I am needing to have SQL Ledger print invoices, but because of the nature of the business, and the structure of the date I need over 95% of the invoices printed so they are grouped by project. Without the project grouping the invoice is meaningless.

One issue with this is batch printing of invoices does not work, or does not work for me, since I can not print batches grouped by project.

Is there any way to make the group by project be the default, even if I have to rewrite a little code, that is not the end of the world.

Thanks guys
Greg

---
Gregory A. West
DB&W Systems Limited

Dieter Simader(R)

04.08.2015, 20:15

@ Gregory West

Having Invoices / Sales Orders default to group by project

I am needing to have SQL Ledger print invoices, but because of the nature
of the business, and the structure of the date I need over 95% of the
invoices printed so they are grouped by project. Without the project
grouping the invoice is meaningless.

One issue with this is batch printing of invoices does not work, or does
not work for me, since I can not print batches grouped by project.

Is there any way to make the group by project be the default, even if I
have to rewrite a little code, that is not the end of the world.

Thanks guys
Greg

bp.pl, on line 471 just before &print_form; add

$form->{groupprojectnumber} = 1;

The other variable to group by Group is

$form->{grouppartsgroup} = 1;

Gregory West(R)

E-mail

Manitoba Canada,
06.08.2015, 12:41

@ Dieter Simader

Having Invoices / Sales Orders default to group by project

Deiter, I did the patch you suggested. Went into the batch print, and printed a bunch of invoices to a PDF. SQL-Ledger did not try to download the PDF to me, nor can I find the PDF on the server. I looked in the /spool dir, and found all the single PDF's invoices created, but I can not file the batch one. Any suggestions?

Checking more and cleaning up the spool directory. I see the print does put the PDF's in that directory. Problem is the reports are still not grouped by project, at least the project header and subtotals are not showing up on the invoice. Here is the code if the file in the ../bin/lynx/bp.pl file: Lines 450 to 485
# default
@f = split /\n/, $form->unescape($form->{"select${arap}_paid"});
$form->{payment_accno} ||= $f[0];

for (2 .. $form->{paidaccounts}) {
$form->{"paid_$_"} = $form->format_amount(\%myconfig, $form->{"paid_$_"}, $form->{precision});
$form->{payment_accno} = $form->{"${arap}_paid_$_"};
}

$form->{"${arap}_paid_$form->{paidaccounts}"} = $form->{payment_accno};
$inv = 'inv'
}

$form->{rowcount}++;

# unquote variables
if ($form->{media} eq 'email' || $form->{media} eq 'queue') {
for (keys %$form) { $form->{$_} = $form->unquote($form->{$_}) }
}

$myform->{description} = $form->{description};

$form->{groupprojectnumber} = 1;

&print_form;

$myform->info("${r}. ".$locale->text($msg{$myform->{batch}}).qq| ... $myform->{"reference_$i"}|);
$myform->info(qq|, $myform->{description}|) if $myform->{description};

if ($myform->{"module_$i"} ne 'jc') {
if ($form->{formname} =~ /_invoice/) {
$total -= $form->parse_amount(\%myconfig, $form->{"${inv}total"});
} else {
$total += $form->parse_amount(\%myconfig, $form->{"${inv}total"});
}
$myform->info(qq|, $form->{"${inv}total"}, $form->{"$form->{vc}number"}, $form->{"$form->{vc}"} $form->{city}|);



I am needing to have SQL Ledger print invoices, but because of the
nature
of the business, and the structure of the date I need over 95% of the
invoices printed so they are grouped by project. Without the project
grouping the invoice is meaningless.

One issue with this is batch printing of invoices does not work, or does
not work for me, since I can not print batches grouped by project.

Is there any way to make the group by project be the default, even if I
have to rewrite a little code, that is not the end of the world.

Thanks guys
Greg

bp.pl, on line 471 just before &print_form; add

$form->{groupprojectnumber} = 1;

The other variable to group by Group is

$form->{grouppartsgroup} = 1;

---
Gregory A. West
DB&W Systems Limited

Back to the board
Thread view  Mix view  Order
986 Postings in 325 Threads, 327 registered users, 104 users online (0 registered, 104 guests)
SQL-Ledger User Forum | Admin contact
RSS-Feed
powered by my little forum