Invoice paid by another business partner

432 views
Skip to first unread message

Nicolas Micoud

unread,
Jan 9, 2013, 7:00:03 AM1/9/13
to idem...@googlegroups.com
Hi,

I have an interesting case :

 - invoice n°1 which was received from Vendor A.
 - invoice n°2 which was received from Vendor B.

B paid invoice n°1 to A (send a check directly).

I have to pay B for invoice 2 and the amount of invoice 1.

How can it be done ?
I thought about Partner Relation but it is designed for sales

Any ideas ?


Thanks,

Nicolas


Carlos Antonio Ruiz Gomez

unread,
Jan 10, 2013, 11:51:29 AM1/10/13
to idem...@googlegroups.com
Hi Nicolas - we had a similar case in one implementation.

We decided that what happened there was a "transfer of accounts
receivable" between two bps.

So, we solved this doing a credit note to A using a charge called
"transfer of accounts receivable" - and then a debit note to B using the
same charge.

Regards,

Carlos Ruiz

Nicolas Micoud

unread,
Jan 10, 2013, 12:09:29 PM1/10/13
to idem...@googlegroups.com
Yes, that should work. But souds like a workaround.
As it is something that can arrive from time to time, i was thinking of an enhancement ; let me describe it :

Add a checkbox on Payment / Allocate tab which will allow to select any invoice.
So, you make a payment to B and select invoice 1 and 2.

Then, we need to change MPayment.allocateIt in order to modify the allocation
If the PaymentAllocate is "allow select any invoice", then we will have to create 2 lines (instead of 1):
1 line for the payment vendor (B)
1 line for the invoice vendor (A)

Completing the allocation will clear all accounts.

WDYT ?

Regards,

Nicolas


armenrz

unread,
Jan 14, 2013, 9:15:59 PM1/14/13
to idem...@googlegroups.com
Hi Nicolas,

What we did is to modify Payment Allocation window, add a new field "Invoice Partner" so they can match any BP's payment to any IP's invoice.

The only thing we sacrifice is you cannot offset account Unallocated Payment per BP, as the BP dimension are different, but as a whole the balance it's ok

Regards,

Armen Rizal

Nicolas Micoud

unread,
Jan 15, 2013, 3:24:24 AM1/15/13
to idem...@googlegroups.com
 Hi Armen,

I don't get it, you add a field on which table ? C_Payment or C_PaymentAllocate ?
I have to make a single payment which has to pay 2 invoices from 2 different BP.
Is it something that can be done using you solution ?

Regards,

Nicolas

armenrz

unread,
Jan 16, 2013, 12:00:25 AM1/16/13
to idem...@googlegroups.com
Hi Nicolas,

I didn't add new field in table. This is from one of our implementation projects long time ago. As I recall, we just modified the Payment Allocation form so they can search any payment using BP as usual and search any invoices using a new field Invoice Partner so they can allocate Payment of A to Invoice of B.

The current behaviour is just showing Payment and Invoices from the same BP. This requires code modification in VAllocation.java

Regards,

Armen

Nicolas Micoud

unread,
Jan 16, 2013, 2:50:46 AM1/16/13
to idem...@googlegroups.com
ok i get ; i thought you were talking about the window and not the form.
Thanks

Neil Gordon

unread,
Jun 15, 2015, 8:55:25 AM6/15/15
to idem...@googlegroups.com
We are also interested in this functionality.

Before developing it from scratch, did anyone implement this already, and if so would you be willing to share the code?

Regards,

-----
Neil Gordon
nTier Software Services
http://www.ntier.co.za

Nicolas Micoud

unread,
Jun 15, 2015, 10:05:27 AM6/15/15
to idem...@googlegroups.com
Hi,

Here how we manage  :
 - duplicate payment window and add new validation code on C_PaymentAllocate.C_Invoice (C_Invoice.DocStatus IN ('CO', 'CL') AND C_Invoice.C_Currency_ID=@C_Currency_ID@ AND C_Invoice.IsSOTrx='@IsReceipt@') // we remove the check of the bpartnerID
 - add a plugin to generate new accounting facts (BP A => BP 2 on the UnallocatedCash account)

Note that the customer never use this enhancement, so i cannot assure it will work in 100% of cases.
I just also notice that i only manage Sales (Sales account are hardcoded) ; i need to adapt for vendor invoices.

As I'm overridng a standard window, I'm not sure what would be the best best way to distribute it. Maybe a 2Pack with the new validation rule. Then the implementor can use it or not.

wdyt ?

Regards,

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Jun 15, 2015, 11:11:48 AM6/15/15
to idem...@googlegroups.com
Neil, maybe you can test and give feedback to this plugin from Fabian Aguilar
http://wiki.idempiere.org/en/Plugin:_Two_Business_Partner_Allocation

Regards,

Carlos Ruiz



El 15/06/15 a las 07:55, Neil Gordon escribió:

Neil Gordon

unread,
Jun 17, 2015, 2:58:06 AM6/17/15
to idem...@googlegroups.com
Hi Nicolas,

Thank you for the method, and the validation code. I will let you know, if I try it and make any progress.

Yes, a 2pack with a validation rule sounds like the way to go.

Regards,

Neil

Neil Gordon

unread,
Jun 17, 2015, 2:59:02 AM6/17/15
to idem...@googlegroups.com
Hi Carlos,

Thank you very much for the pointer - will have a look into it, and give feedback here.

Regards,

Neil

Neil Gordon

unread,
Jun 17, 2015, 9:51:31 AM6/17/15
to idem...@googlegroups.com
Hi Nicolas,
 
- add a plugin to generate new accounting facts (BP A => BP 2 on the UnallocatedCash account)

Would you be willing to share this code? Even as a work in progress ? ...

Regards,

Neil

On Monday, June 15, 2015 at 4:05:27 PM UTC+2, Nicolas Micoud wrote:

Daniel Tamm

unread,
Jun 17, 2015, 10:09:12 AM6/17/15
to idem...@googlegroups.com
Just noticed this thread. Accounting systems normally don't support this.

What accountants do when this happens is to in the system create an "out-payment" on BP A and "in-payment" on BP 2 on the same bank account. The total of the transactions will be zero but you have changed the business partner. If you don't want to "clot" the real bank account with these transactions a temporary account can be used.

I noticed Nicolas said that the customer never uses the enhancement and I think the above solution is one reason why.

However, I can see that a two business partner allocation functionality can be useful in a setting where there are a lot of duplicate business partners, ie the same business partner has many records which actually is the same business partner. Not uncommon in scenarios where the ERP is connected to a web store where the user can supply user/customer information themselves (they forget the login and create a new user)

Just to let you in on an accountants viewpoint :-)

Regards
/Daniel
--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/12a2f314-b5d4-40a3-9d21-95aeb2f62760%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--
Notima AB
Lärjungevägen 6
SE-136 69 Vendelsö
Tel: +46 8 776 31 30
Web: http://www.notima.se/
--

Nicolas Micoud

unread,
Jun 17, 2015, 10:16:29 AM6/17/15
to idem...@googlegroups.com
Hi,

@Neil : will try to upload it tonight (as a plugin - at least in a draft state)
@Daniel : in fact, the customer asked a lot of modification - and he specifically ask for that one, but the use case hasn't happen yet.
My first answer was similar to what you describe (2 payments), but it was too 'complex' for him.

Nicolas

Nicolas Micoud

unread,
Jun 17, 2015, 1:25:36 PM6/17/15
to idem...@googlegroups.com
Plugin at a very draft stage available here : https://bitbucket.org/nmicoud/org.tgi.acct.alloc-inter-bpartner
I don't have a lot of time ATM, so I haven't tested, just put the code for generating extra accounting facts and the 2Pack

Feel free to improve it and upload fixes

Regards,

Nicolas

Neil Gordon

unread,
Jun 18, 2015, 5:03:15 AM6/18/15
to idem...@googlegroups.com
Hi Nicolas,

We really appreciate, you taking the time to share your code.

Looks like a good example of overriding or adding to iDempiere's accounting.

Regards,

Neil

Steven Sackett

unread,
Jun 18, 2015, 2:15:51 PM6/18/15
to idem...@googlegroups.com
Other option using existing functionality.
Invoice bp1
Payment bp2

Payment allocation form.
Bp1 .. Select invoice, select charge 'suspense' .. Process.
Bp2 .. Select payment. Select charge 'suspense' .. Process.

Regards.
Message has been deleted

manish...@gmail.com

unread,
Mar 18, 2016, 9:32:07 AM3/18/16
to iDempiere
Dear Sir ,
Thanks for the great effort
I have added the plugin ,but when we allocate Payment from A(5000 USD) to invoice of B(5000 USD) ...on allocation accounting its Debit the payable (A) and credit  the payment selection .....but what about the B balance in GL account(payable) (5000 USD )
Reply all
Reply to author
Forward
0 new messages