Skip to main content
Solved

BPA to create a Manual Supplier Invoice


Forum|alt.badge.img+9

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

Best answer by malik.sally

@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

View original
Did this topic help you find an answer to your question?

Forum|alt.badge.img+9

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


dsj
Superhero (Partner)
Forum|alt.badge.img+22
  • Superhero (Partner)
  • October 16, 2024

@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

 


Forum|alt.badge.img+9

Thank’s for the response.

Already tried that, but getting the same error

 

 


Forum|alt.badge.img+9

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

 

thanks in advanced 


dsj
Superhero (Partner)
Forum|alt.badge.img+22
  • Superhero (Partner)
  • October 17, 2024

Hi @IFSRUNINNOVAL 

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


Forum|alt.badge.img+9

@dsj 

sadly the same error

 


Lahirumala de Mel
Hero (Employee)
Forum|alt.badge.img+7

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


Forum|alt.badge.img+9

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

 

 


Forum|alt.badge.img+10
  • Hero (Partner)
  • October 21, 2024

@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


Forum|alt.badge.img+9

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

I’ll look into it

Do you have any documentation please?


dsj
Superhero (Partner)
Forum|alt.badge.img+22
  • Superhero (Partner)
  • October 21, 2024

@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

 


Forum|alt.badge.img+9

@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

}


Forum|alt.badge.img+9

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


Forum|alt.badge.img+10
  • Hero (Partner)
  • October 22, 2024

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!

 


Forum|alt.badge.img+9

@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


dsj
Superhero (Partner)
Forum|alt.badge.img+22
  • Superhero (Partner)
  • October 22, 2024

@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


Forum|alt.badge.img+10
  • Hero (Partner)
  • October 22, 2024

@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?


Forum|alt.badge.img+9

 @malik.sally CP005 is well related to the COOPERATIVE

 


Forum|alt.badge.img+9

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings