Page 1 of 1

Service Item Lines being Duplicated when Printing

Posted: 02 Sep 2013, 16:38
by AirfilProPack
We have tweaked the existing SOP Plain A4 Layout to our needs. Originally we found that when using service Items no description was being printed. This was quickly resolved by changing the 'Text' filed to 'Description' in section 3.Details. However now when printing all Service Code lines print twice, but normal stock item line print correctly once.

We're really stumped on this as this is a second company, and the original template was copied from the first company, which appears to print ok?

Can anyone spot what we're missing?

Re: Service Item Lines being Duplicated when Printing

Posted: 03 Sep 2013, 09:44
by brucedenney
There are 2 sections in this sort of layout, one is for service items and one is for product items

If you look at 4. ITEM_NUMBER Footer you will see that it has a filter of SOP_ITEM.SERVICE_FLAG = 0 on it. so this section only prints if this is a not service item.

If you look at 3. Details it has a filter of SOP_ITEM.SERVICE_FLAG <> 0 so it only prints if it is a service item.

It looks to me that you have service items that have no long description (TEXT) and where you want to print the short description (DESCRIPTION)

You have got both so when you have something in both you will get them both on top of each other. Is this the issue or are you getting separate lines, printing twice is vague.

Re: Service Item Lines being Duplicated when Printing

Posted: 06 Sep 2013, 08:01
by AirfilProPack
Hi Bruce,

Sorry it was so vague, for example with have a stock code AFDEL, so if we raise a Sales Order (Service Item not Stock):

CODE Description Qty £
AFDEL Del Ref: 200123 1 11.73
AFDEL Del Ref: 200525 1 10.13
AFDEL Del Ref: 200999 1 25.30

What actually prints is:

CODE Description Qty £
AFDEL Del Ref: 200123 1 11.73
AFDEL Del Ref: 200123 1 11.73
AFDEL Del Ref: 200525 1 10.13
AFDEL Del Ref: 200525 1 10.13
AFDEL Del Ref: 200999 1 25.30
AFDEL Del Ref: 200999 1 25.30

Re: Service Item Lines being Duplicated when Printing

Posted: 06 Sep 2013, 08:06
by AirfilProPack
Also we only enter the product description details in the Description box, we don't use the long text box.

I tried what you describe and I don't get the duplication.

Re: Service Item Lines being Duplicated when Printing

Posted: 09 Sep 2013, 17:19
by brucedenney
Excuse me for asking, but why are you using a service product if you are not using the text box, that was the only point of having service items, or is there something I am missing?

I can't reproduce the duplication by doing what you are describing on the demo data.

Are you sure the layout you posted is the one you are using?

Re: Service Item Lines being Duplicated when Printing

Posted: 11 Sep 2013, 08:31
by AirfilProPack
Yes it's the correct layout.
I've also attached a screen shot of a Sales Order and then a copy of the pdf showing how it prints using the templates.
We've also cross reference the Sales order template with the delivery note and invoice one as they print correctly, to see if we had set up section flags and such wrong, but can't see anything........

Re: Service Item Lines being Duplicated when Printing

Posted: 11 Sep 2013, 09:33
by brucedenney
I have done the same thing and I don't get the same results!

There is something strange happening.

I think that we need to establish what is happening for sure.

I assumed that the duplication is because both sections The Service (3) and the not service (4) sections are both printing for the one line on the order. they both look identical so it is hard to tell them apart. Attached is a slightly modified version of the original you posted that show the service flag on each line. Can you print the order using this layout so we can see if the the same line is repeating or if it is different lines.

Can you also try adding an "S3" service item to an order and see if that duplicates.

Re: Service Item Lines being Duplicated when Printing

Posted: 22 May 2018, 12:07
by pauljj
Hi Bruce,
Just reading through this as i'm having a similar issue on the service lines printing multiple time, and i think for myself it's because I've included the GDN table which you helped me with a while back.

I've managed to pull this expression in for the service line INVOICE.ITEM.TEXT field as per
"Length(INVOICE_ITEM.DESCRIPTION) = 0 ? INVOICE_ITEM.TEXT :
Substring(INVOICE_ITEM.TEXT,0,Length(INVOICE_ITEM.DESCRIPTION)) = INVOICE_ITEM.DESCRIPTION ? INVOICE_ITEM.TEXT :
INVOICE_ITEM.DESCRIPTION + "
" + INVOICE_ITEM.TEXT "
We use both fields and this pulls both descriptions in quite nicely. I'm not sure if this is useful, as i was getting duplication prior to adding this in.

All the Service item fields are in the Details section and set to reset after "Details", and i think i'm getting duplicated lines depending on how many items are on the dispatch note.
I've tried different reset groups etc but nothing seems to work.
The filters for each group are as per your advice, so i'm not exactly sure where my focus should be to try and resolve it ?

Thanks for your time again in advance.Paul

Re: Service Item Lines being Duplicated when Printing

Posted: 22 May 2018, 12:14
by brucedenney
Best if you attach the layout and I can have a look.

Re: Service Item Lines being Duplicated when Printing

Posted: 22 May 2018, 12:18
by pauljj
Hi Bruce,
Here is the attached.
INVOICE-CREDIT-WITH SERVCE-PRACTICE.layout

Re: Service Item Lines being Duplicated when Printing

Posted: 29 May 2018, 10:26
by brucedenney
I am unable to reproduce the result you are experiencing, it must be a number of conditions that need to be in place to make it happen, using the demo data, nothing would print, because there were no GDNs, having created GDNs, they all print fine with no issues. I tried adding S3 items and non stock items from stock, I couldn't get the same results.

Without being able to reproduce the issue, I can't really help much.

Re: Service Item Lines being Duplicated when Printing

Posted: 31 May 2018, 09:53
by brucedenney
I had another go and managed to reproduce the issue.

The problem is that you are linking to the GDN_ITEM table, so all the items on the GDN are returned for each invoice so you get multiple lines.

I am not sure why you don't get this on the Stock Items...

Anyway if you add a filter to limit the records returned to just one eg " GDN_ITEM.ITEM_NUMBER = 1 " then it will work.

Re: Service Item Lines being Duplicated when Printing

Posted: 01 Jun 2018, 09:06
by pauljj
Bruce you genius!!

I was just about to write to you as i'd remembered a difference between an invoice template that we use based on raising invoices from new, where the sales order information is not built in on the Order Tab, where it works no problem and this one we are looking at which is an invoice raised automatically from a sales order once dispatched.

So, i was just about to look at that GDN table myself and just saw your reply.

I cannot thank you enough for re-visiting this for me.
This solution works like a dream.

Many thanks
Paul