Solved

Don't Copy 'n Paste Invoice Discounts

  • 12 September 2022
  • 3 replies
  • 77 views

Userlevel 2
Badge

Hey all,

I have a situation with a document discount that when an Invoice is Copy ‘n Pasted it creates a copy of the discount.  I read this article, which is helpful, but I feel I’m missing something because nothing I’ve tried has worked.

I’ve set a PXCopyPasteHiddenView in a PXGraphExtension<ARInvoiceEntry> class:


[PXCopyPasteHiddenView]        

public PXSelectJoin<ARInvoiceDiscountDetail, InnerJoin<ARInvoice, On<ARInvoice.docType, Equal<ARInvoiceDiscountDetail.docType>, And<ARInvoice.refNbr, Equal<ARInvoiceDiscountDetail.refNbr>>>» Discounts;

 

I’m wondering if my PXSelect/PXSelectJoin is incorrect and if so what should it be?

Thanks all!

icon

Best answer by jinin 12 September 2022, 18:39

View original

3 replies

Userlevel 7
Badge +11

Hi @asommer 

You need to use the same view name to hide the copy paste  view on the extension graph. Can you please try  like below?

   [PXCopyPasteHiddenView]
        public PXSelect<ARInvoiceDiscountDetail,
            Where<ARInvoiceDiscountDetail.docType, Equal<Current<ARInvoice.docType>>,
                And<ARInvoiceDiscountDetail.refNbr, Equal<Current<ARInvoice.refNbr>>>>,
            OrderBy<Asc<ARInvoiceDiscountDetail.lineNbr>>> ARDiscountDetails;

Userlevel 2
Badge

@jinin that worked!  Thank you very much, I appreciate it.

 

Woops, I clicked the “Best Answer” for my thank you message, but totally meant it to be your reply.

Userlevel 7
Badge

Hi @asommer - I have fixed the best answer 😀

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved