When changing the groovy file i can rule most of the options out, which
leaves me with the items i wanted... but its not as flexible as i wished it
to be.
webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy
if ("SALES_INVOICE".equals(invoice.invoiceTypeId)) {
itemTypesCond = exprBldr.OR() {
//EQUALS(invoiceItemTypeId: "INVOICE_ADJ")
//EQUALS(parentTypeId: "INVOICE_ADJ")
//EQUALS(invoiceItemTypeId: "INVOICE_ITM_ADJ")
//EQUALS(parentTypeId: "INVOICE_ITM_ADJ")
EQUALS(invoiceItemTypeId: "INV_PROD_ITEM")
EQUALS(parentTypeId: "INV_PROD_ITEM")
}
invoiceItemTypes = delegator.findList("InvoiceItemType", itemTypesCond,
null, ["parentTypeId", "invoiceItemTypeId"], null, false);
glAccountOrganizationAndClassList =
delegator.findByAnd("GlAccountOrganizationAndClass", [organizationPartyId :
invoice.partyIdFrom], null, false);
On 12 March 2014 15:09, Adrian Stern <[email protected]> wrote:
> In the
> file webapp/accounting/WEB-INF/actions/invoice/GetInvoiceItemTypes.groovy
> there seem to be some constraints if only SALES_INVOICES are needed. It
> loads INVOICE_ITM_ADJ, INVOICE_ADJ and INV_PROD_ITEM witch sums up to 12
> matching entries when looking them up in the entity engine and comparing
> them to those available in the dropdown.
>
> This leaves me with two items where i can't figure out where they are
> coming from: INVOICE_ADJ & INV_PROD_ITEM which both have not parent (in
> entety engine) and are used in the groovie file above.
>
> This are the options in the said dropdown:
> "COMM_INV_ADJ" Commission Invoice Adjustment
> "CRETURN_ADJ" *InvoiceItemType.description.CRETURN_ADJ *
>
> "INVOICE_HEAD_ADJ" *InvoiceItemType.description.INVOICE_HEAD_ADJ*
>
> "INVOICE_ITM_ADJ" Invoice Item Adjustment
> "SRETURN_ADJ" *InvoiceItemType.description.SRETURN_ADJ*
>
> "PINVOICE_ITM_ADJ" Invoice Item Adjustment
> "SINVOICE_ITM_ADJ" *InvoiceItemType.description.SINVOICE_ITM_ADJ*
>
> "INV_DPROD_ITEM" Invoice Digital Good Item (Sales)
> "INV_FDPROD_ITEM" Invoice Finished/Digital Good Item (Sales)
>
> "INV_FPROD_ITEM" Invoice Finished Good Item (Sales)
> "INV_PROD_FEATR_ITEM" Invoice Product-Feature Item (Sales)
> "INV_SPROD_ITEM" Invoice Service Product Item (Sales)
> "INVOICE_ADJ" Invoice Adjustment
> "INV_PROD_ITEM" Invoice Product Item (Sales)
>
> Some of the above don't even have a real description. They show some other
> string instead. Since nobody would roll this out to a customer like this,
> my question is *what is the simpelst/cleanest way to remove unneeded
> items*?
>
> As for the forms/screens i viewed:
> /home/adrian/projects/ofbiz/applications/accounting/widget
> InvoiceForms.xml
> InvoiceItemTypeForms.xml
> InvoiceItemTypeScreens.xml
> InvoiceScreens.xml
>
>
>
> On 12 March 2014 14:56, Pierre Smits <[email protected]> wrote:
>
>> Adrian,
>>
>> Please also provide information in which form(s)/screen(s) did you find
>> said code. This will assist other contributors to find the related aspects
>> to help you solve your issue in stead of mucking around in guesswork and
>> losing interest. Which doesn't benefit anybody.
>>
>> Regards,
>>
>> Pierre Smits
>>
>> *ORRTIZ.COM <http://www.orrtiz.com>*
>> Services & Solutions for Cloud-
>> Based Manufacturing, Professional
>> Services and Retail & Trade
>> http://www.orrtiz.com
>>
>
>