Hi Victor, Many thanks for your answer.
May be you are right about ECA's, gonna check it again. Previously I've read setInvoiceStatus code but I couldn't find code related to register accounting transactions. Best regards. Carlos Navarro On 2020/12/18 19:35:36, Victor Hernández <[email protected]> wrote: > Hi Carlos, > > I would bet that it happens via Sevice ECA's, specially > into createAcctgTransForSalesInvoice service implementation. I recommend to > you start checking the setInvoiceStatus service definition using ofbiz web > tools. > > Kind Regards, > Victor > > On Fri, Dec 18, 2020 at 2:35 AM Carlos Navarro <[email protected]> > wrote: > > > Hi, > > > > When a sale inovice status is set to Ready in Accounting-AR, OFBiz > > generates two accounting entries (Transactions). How is it done? > > > > Going through code, > > > > what i can see is (overall): > > . <menu name="InvoiceSubTabBar" menu-container-style="button-bar > > button-style-2" default-selected-style="selected"> > > > > . <menu-item name="statusToReady" > > title="${uiLabelMap.AccountingInvoiceStatusToReady}"> > > <condition> > > <and> > > <not><if-empty field="invoice.invoiceId"/></not> > > <or> > > <if-compare field="invoice.statusId" > > operator="equals" value="INVOICE_IN_PROCESS"/> > > <if-compare field="invoice.statusId" > > operator="equals" value="INVOICE_SENT"/> > > <if-compare field="invoice.statusId" > > operator="equals" value="INVOICE_RECEIVED"/> > > <if-compare field="invoice.statusId" > > operator="equals" value="INVOICE_APPROVED"/> > > </or> > > </and> > > </condition> > > <link target="setInvoiceStatus"> -> Al terminar este menú se > > ecuentra el mapeo de setInvoiceStatus > > <parameter param-name="invoiceId" > > from-field="invoice.invoiceId"/> > > <parameter param-name="statusId" value="INVOICE_READY"/> > > </link> > > </menu-item> > > > > <request-map uri="setInvoiceStatus"> > > <security https="true" auth="true"/> > > <event type="service" invoke="setInvoiceStatus"/> > > <response name="success" type="view" value="invoiceOverview"/> > > <response name="error" type="view" value="invoiceOverview"/> > > </request-map> > > > > <service name="setInvoiceStatus" engine="simple" > > > > location="component://accounting/minilang/invoice/InvoiceServices.xml" > > invoke="setInvoiceStatus"> > > <description>Set the Invoice Status</description> > > <permission-service service-name="acctgInvoicePermissionCheck" > > main-action="UPDATE"/> > > <attribute name="invoiceId" type="String" mode="IN" > > optional="false"/> > > <attribute name="statusId" type="String" mode="IN" > > optional="false"/> > > <attribute name="statusDate" type="Timestamp" mode="IN" > > optional="true"/> > > <attribute name="paidDate" type="Timestamp" mode="IN" > > optional="true"/> <!-- only relevant for changes to PAID --> > > <attribute name="invoiceTypeId" type="String" mode="OUT" > > optional="true"/> > > <attribute name="oldStatusId" type="String" mode="OUT" > > optional="true"/> > > </service> > > > > In component://accounting/minilang/invoice/InvoiceServices.xml", > > setInvoiceStatus, I can see where the Status is changed, but I can't see > > any code making accounting entries. > > > > ¿How OFBiz generate accounting entries when an invoice status is set to > > Ready? > > > > Thanks. > > > > Carlos Navarro > > >
