Hi Emad, Unfortunately I haven't found any useful algorithm related to payment splitting yet. I plan to study it later. For partial payments now we are going to implement splitting logic by ourselves.
BR, Denis On Sun, Mar 30, 2025 at 12:40 AM Emad Radwan <[email protected]> wrote: > Hello Denis, > > Yes, you're right. On the hand, do you have an idea what terms affect the > calculation of other artifacts like this example and those that are only > there for documentation? > > Regards, > Emad > > On Sat, Mar 29, 2025 at 1:18 PM Denis G <[email protected]> wrote: > > > Hi Emad, > > Yep, filename is correct. Here is direct link to it > > > > > https://github.com/apache/ofbiz-framework/blob/trunk/applications/accounting/src/main/groovy/org/apache/ofbiz/accounting/payment/PaymentServices.groovy > > But I spent some time debugging this and found that this code is not > called > > when payment is created from purchase order. > > > > Payment is created by the function createPaymentFromOrder (line 610). In > it > > I see only effectiveDate determination based on payment term. > > While splitting is coded in function getInvoicePaymentInfoList (line 89). > > > > So my conclusion is that it works only with payment applications, but > > doesnt work to split payment parts. > > > > > > Fr, 28 mar. 2025 г. at 23:24, Emad Radwan <[email protected]>: > > > > > Hello Denis, > > > > > > Are you sure about the file name as I didn't find > PaymentServices.groovy > > > but there's PaymentServices.xml? > > > > > > Regards, > > > Emad > > > > > > On Thu, Mar 13, 2025 at 4:02 PM Denis G <[email protected]> wrote: > > > > > > > Hi all, > > > > In Seed data there are several payment term types for purchase orders > > and > > > > agreements (Financial, Payment (net days), Payment net days, part 1, > > > etc). > > > > > > > > I have created a purchase order from Company to DemoSupplier (total > > > 900$). > > > > With Order terms: > > > > Payment net days, part 1: value = 0.25 , days = 10 > > > > Payment net days, part 2: value = 0.75, days = 20 > > > > > > > > I expected to see 2 payments: one 25% after 10 days from invoice date > > for > > > > 225$ and second after 20 days from invoice date for 675$. > > > > Shouldn't it work that way? > > > > > > > > I see corresponding implementation of logic in > > > > > > > > > > > > > > applications\accounting\src\main\groovy\org\apache\ofbiz\accounting\payment\PaymentServices.groovy > > > > - payment terms with parentID FIN_PAYMENT_TERM should be splitted, > but > > > i'm > > > > not really sure, that my expectations are correct. > > > > > > > > BR, > > > > Denis > > > > > > > > > >
