getting customer shipping address details into a rpt

Chris Good chris.good at ozemail.com.au
Fri Jun 17 04:32:31 EDT 2016


> -----Original Message-----
> From: John Ralls [mailto:jralls at ceridwen.us]
> Sent: Friday, 17 June 2016 7:28 AM
> To: Chris Good <chris.good at ozemail.com.au>
> Cc: gnucash-devel <gnucash-devel at gnucash.org>
> Subject: Re: getting customer shipping address details into a rpt
> 
> 
> > On Jun 16, 2016, at 2:00 PM, Chris Good <chris.good at ozemail.com.au>
> wrote:
> >
> >> -----Original Message-----
> >> From: John Ralls [mailto:jralls at ceridwen.us]
> >> Sent: Friday, 17 June 2016 2:21 AM
> >> To: Chris Good <chris.good at ozemail.com.au>
> >> Cc: gnucash-devel <gnucash-devel at gnucash.org>
> >> Subject: Re: getting customer shipping address details into a rpt
> >>
> >>> On Jun 15, 2016, at 11:14 PM, Chris Good <chris.good at ozemail.com.au>
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I'm modifying aging.scm to allow optional selection of company
> >>> address info to display at the end of each customers aged balances
> >>> so this report can be copied and pasted into a spreadsheet for use
> >>> in mail
> > merge.
> >>>
> >>> I've got all the billing address info working but I'm having trouble
> >>> getting the shipping address fields.
> >>>
> >>> This is what I have so far:
> >>>
> >>> (owner (company-get-owner-obj
> >>>      (cdr company-list-entry)))
> >>> (company-name (gncOwnerGetName owner)) (addr
> (gncOwnerGetAddr
> >>> owner))
> > ;;
> >>> ptr to billing addr
> >>> (addr-name  (gncAddressGetName  addr))
> >>> (addr-addr1 (gncAddressGetAddr1 addr))
> >>> (addr-addr2 (gncAddressGetAddr2 addr))
> >>> (addr-addr3 (gncAddressGetAddr3 addr))
> >>>
> >>> Can some-one pls advise how I can get a ptr to a shipping address?
> >>>
> >>> I've had a look at the entity relationship diagram, gncOwner.c +
> >>> gncCustomer.c but I cannot figure out which functions I need to use.
> >>> I know (gncOwnerGetID owner) returns a company id.
> >>
> >> GncAddress * gncCustomerGetShipAddr (const GncCustomer
> *customer);
> >>
> >> Regards,
> >> John Ralls
> >
> > Hi John,
> >
> > How do I get customer?
> 
> GncCustomer * gncOwnerGetCustomer (const GncOwner *owner) after
> checking that GncOwnerType gncOwnerGetType (const GncOwner *owner)
> returns GNC_OWNER_CUSTOMER.
> 
> Regards,
> John Ralls

Thanks John. Working now :-)

Regards,
Chris Good
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4817 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20160617/fc60d36c/attachment.p7s>


More information about the gnucash-devel mailing list