Hello My Fellow Espo Peeps.
I create a "Payment" entity to receive payments on invoices. I then created a One-to-Many relationship from invoices to payments. I then added a currency field in invoice module called " Amount Received". Now having that said I would like to SUM the field "Payment Amount Received" in the "Payment" module for all related payments. I would then like the result to be added in the "Amount Received" field in the invoice module. I'm NOT using any filter at this moment as Im just testing. Below is my formula which is based on the documentation here >>https://www.espocrm.com/documentation/administration/formula/<<
amountReceived=entity\sumRelated('Payment', 'paymentAmountReceived')
Can anyone see anything wrong with this formula as its not calculating? (Below is screenshots of all related modules)
Entity Manager Invoice Relationship Screenshot: https://prnt.sc/qqdv6w
Entity Manager Invoice Fields Screenshot: https://prnt.sc/qqdvv2
Entity Manager Payment Fields Screenshot: https://prnt.sc/qqdwb9
Entity Manager Payment Relationships Screenshot: https://prnt.sc/qqdwb9
Invoice Screen: https://prnt.sc/qqdy3b
I create a "Payment" entity to receive payments on invoices. I then created a One-to-Many relationship from invoices to payments. I then added a currency field in invoice module called " Amount Received". Now having that said I would like to SUM the field "Payment Amount Received" in the "Payment" module for all related payments. I would then like the result to be added in the "Amount Received" field in the invoice module. I'm NOT using any filter at this moment as Im just testing. Below is my formula which is based on the documentation here >>https://www.espocrm.com/documentation/administration/formula/<<
amountReceived=entity\sumRelated('Payment', 'paymentAmountReceived')
Can anyone see anything wrong with this formula as its not calculating? (Below is screenshots of all related modules)
Entity Manager Invoice Relationship Screenshot: https://prnt.sc/qqdv6w
Entity Manager Invoice Fields Screenshot: https://prnt.sc/qqdvv2
Entity Manager Payment Fields Screenshot: https://prnt.sc/qqdwb9
Entity Manager Payment Relationships Screenshot: https://prnt.sc/qqdwb9
Invoice Screen: https://prnt.sc/qqdy3b
Comment