[OFBiz] Dev - view with optional relation and sum

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Dev - view with optional relation and sum

Hans Bakker
Good evening.. (here at least..)
I need to make a list of the payments which have not yet been fully applied to
invoices or billingaccounts....In the payment table i have the payments and
in the paymentApplication table i have the relations to invoices or billing
accounts.

what i need is all payments of which is the amount of the payment is not fully
existing in the paymentApplication table which is the total of onbe or more  
amountApplied fields

so there can be more applicationrecords for the same payment.

so I created a view:

 <view-entity entity-name="PaymentApplied"
    package-name="org.ofbiz.accounting.payment" never-cache="true"
    title="Payment application summary">
    <member-entity entity-alias="PAYM" entity-name="Payment"/>
    <member-entity entity-alias="PAAP" entity-name="PaymentApplication"/>
    <alias entity-alias="PAYM" name="paymentId" group-by="true"/>
    <alias entity-alias="PAYM" name="partyIdFrom" group-by="true"/>
    <alias entity-alias="PAYM" name="partyIdTo" group-by="true"/>
    <alias entity-alias="PAYM" name="amount" group-by="true"/>
    <alias entity-alias="PAAP" name="totAmountApplied" field="amountApplied"
                                                                                                         function="sum"/>
    <view-link entity-alias="PAYM" rel-entity-alias="PAAP"
                                                                                                         rel-optional="true">
      <key-map field-name="paymentId"/>
    </view-link>


I have a problem here because the rel-optional="true" parameter is not
honered, it is even worse, I only get some not all records on the screen by
using the link in the static table list in webtools.

any body can tell me what i am missing here?

thanks in advance for your help...

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

attachment0 (196 bytes) Download Attachment