Skip to main content

Hello everybody.

Where are trying to create a supplier Invoice directly after recevieing the the maintenance purchase order.

(Financials - Supplier Invoice - Manual Supplier Invoice)

 

The Virtual assistant in aurena creates the header, and if it is not specified it creates a default Line.

In the log we can only find the header api, with no line calling. Then a finish invoice action is made

 

The header is created using 

{{url}}/main/ifsapplications/projection/v1/ManualSupplierInvoiceAssistantHandling.svc/ManSuppInvoiceVirtualSet

 

and the line using 

{{url}}/main/ifsapplications/projection/v1/ManualSupplierInvoiceAssistantHandling.svc/ManSuppInvoiceVirtualSet(Objkey='{{ObjkeyFactureVir}}')/ManSuppInvoiceItems 

( "ParentObjkey": "{{ObjkeyFactureVir}}" should be included in the line body as well )

 

And then the finish action : 

{{url}}/main/ifsapplications/projection/v1/ManualSupplierInvoiceAssistantHandling.svc/FinishInvoice

 

 

When trying to replicate those steps in a Workflow, :

 

The header is created correctly (we think) : 

But we are blocked using the line api since both of them use the same api, but we are not unable to figure out how to pass the objkey to the projection process

ManualSupplierInvoiceAssistantHandling.svc/ManSuppInvoiceVirtualSet(Objkey='{{ObjkeyFactureVir}}')/ManSuppInvoiceItems 

 

 

 

 

Any idea how to automate this process or call correctly the projection to create the line please?

Any help would be gladly appreciated

@dsj was wondering if you have any thought on the matter please.


@IFSRUNINNOVAL

 

Looks like a tiny mistake in the projection action to create items 🙂 Objkey need to surround by single quotes.

Hope it would solve the problem.

 

/Damith

 


Thank’s for the response.

Already tried that, but getting the same error

 

 


@Lahirumala de Mel any idea on the subject please? 
all help is appréciated 

 

thanks in advanced 


Hi @IFSRUNINNOVAL 

Just to make sure, Key should be Objkey, not ObjKey. Have you tried that?


@dsj 

sadly the same error

 


Since this seems to be problematic is there any other way you can create a invoice item avoiding nested entities in virtuals? Does this solve your purpose?

main/ifsapplications/projection/v1/ManualSupplierInvoiceHandling.svc/ManSuppInvoiceSet(Company='{Company}',InvoiceId={InvoiceId})/ManSuppInvoiceItems


thank you @Lahirumala de Mel 

I’m not able to refrence the header created from virtual to the line created from ManSuppInvoiceItems cause the invoice_id is not yet generated.

And we could’nt find how to creat a header not from virtual

main/ifsapplications/projection/v1/ManualSupplierInvoiceHandling.svc/ManSuppInvoiceSet

in ManualSupplierInvoiceHandling we do see the get method for the header set

ManSuppInvoiceSet but there is no POST method to creat the header

 

 


@IFSRUNINNOVAL , Just wondering why you wouldn’t use the standard functionality of RCTI (Recipient Created Tax Invoice) or Self-Billing. This standard functionality will create an invoice at PO receipt.

Cheers!

Malik


@malik.sally  thank you for the proposition, i didn’t know about it.

I’ll look into it

Do you have any documentation please?


@IFSRUNINNOVAL 

Hope following response would explain the “unreachable from current path” error.

Error in Workflow | IFS Community

i tried to create the workflow as you did and ended up in the same situation. Therefore it’s not due to parameter naming :|

 

one thing I noticed is that if you put Gross amount and Finish the wizard, it will create an invoice with one line.

I was trying the below setup

Now I’m geting cannot Rollback exception

 

It could be due to my Header payload is missing some data, but at least it’s reaching the Invoice_api ;)

You may try this if your requirement is to create an invoice with one line. 

 

Cheers!

Damith

 


@dsj  thank you for the implication.

I tried it threw BPA and via postman.

when finishing, we get an oracle error for both methods  : 

                "message": "ORA-20105: Invoice.SEQFAULT2: At least one Invoice Line must be entered before saving Invoice"

Postman body : 

{

    "Company": "COOPERATIVE",

    "Identity": "237622",

    "PartyType": "Supplier",

    "SeriesId": "SI",

    "InvoiceNo": "DSJ",

    "InvoiceDate": "2024-10-18",

    "CreationDate": "2019-10-18",

    "PayTermBaseDate": "2024-10-18",

    "DueDate": "2024-11-17",

    "Creator": "POSTMAN_GEORGI",

    "CurrRate": 1,

    "InvoiceType": "SUPPINV",

    "PayTermId": "30",

    "AffLinePost": false,

    "Currency": "EUR",

    "CurrencyRateChangable": false,

    "Sent": "FALSE",

    "MultiCompanyInvoice": "FALSE",

    "InvoiceVersion": 1,

    "AdvInv": false,

    "ProposalExist": false,

    "PostPrelTaxWith": false,

    "WhtAmountBase": "InvoiceNetAmount",

    "PrepayBasedInv": false,

    "UseProjAddressForTax": false,

    "SiiProposal": false,

    "OperationalKey": "NoValue",

    "OutInvVouDateBase": "InvoiceDate",

    "OutInvCurrRateBase": "InvoiceDate",

    "TaxSellCurrRateBase": "InvoiceDate",

    "AboveTaxControlLimit": false,

    "ReportingSent": false,

    "ReportingAttachments": false,

    "UseDeliveryInvAddress": false,

    "Cash": "FALSE",

    "TempAuthorizeForPay": "AtFinalPosting",

    "AuthId": "*",

    "InvActualNetCurrAmt": 100,

    "ActualNetCurrAmount": 100,

    "NetCurrAmount": 100,

    "VatCurrAmount": 20,

    "InvVatCurrAmt": 20,

    "InvGrossCurrAmt": 120,

    "GrossCurrAmount": 120,

    "NonDeductTaxCurrAmount" : 0,

    "TaxCurrRate": 1,

    "InvoiceRecipient": "*",

    "DivFactor": 1,

    "LineCount" :1,

    "MatchingLevel":"RECEIPT_LEVEL",

    "InstCount" : 1

}


@malik.sally  is the self billing also supported for Maintenance Purchase Order please?


Self Billing is defined on the Supplier Setup. Once enabled it works for all PO’s related to the supplier by default, unless it is overridden on the PO line level.


On a case by case basis you can override self-billing by switching off the toggle on the PO Line level.

Once the PO Line is received the system will create a supplier invoice automatically. Magic!

 


@malik.sally 

i have tried it but i can’t find the invoice : 

 

@dsj i have opened a case on this, IFS are trying to replace the projection block by a Rest Call one


@IFSRUNINNOVAL 

 

If you add the InvGrossCurrAmt in a POST call to the virtual, after creation, then I think it would work with Postman.

 

But it would be nice if you could get the self billing functionality working as Malik suggested. looks like it’s meant for this purpose.

/Damith


@IFSRUNINNOVAL On the supplier master record did you enable self-billing under the correct company for which the PO is raised? Supplier Company says Corporative -Innoval, and PO is raised for CP005. Does CP005 sit under Coorperative-Innoval?


 @malik.sally CP005 is well related to the COOPERATIVE

 


@malik.sally  it works like magic! thank you !


Reply