verbb / xero

Other
1 stars 6 forks source link

feat(invoices): raise an InvoiceEvent before and after invoice save #10

Closed judereid closed 3 years ago

judereid commented 3 years ago

@thejoshsmith We needed the ability to hook in and add some additional data to contacts and invoices when saving. I saw the todos in there so thought I'd have a crack and send through a PR.

Is this what you had in mind? Am I missing anything?

moacode commented 3 years ago

Hey @judereid, looks good to me at first glance. Will have a proper look over it as soon as I can and get it merged.

judereid commented 3 years ago

@thejoshsmith polite bump here πŸ˜…

Let me know if you don't think you'll get a chance to look at this in the next few days and I'll set us up to use the forked version instead in the meantime.

moacode commented 3 years ago

Hey Jude, yeah that's probably the best option as I'm slammed at the moment!

On Tue, Jun 15, 2021 at 12:30 PM Jude @.***> wrote:

@thejoshsmith https://github.com/thejoshsmith polite bump here πŸ˜…

Let me know if you don't think you'll get a chance to look at this in the next few days and I'll set us up to use the forked version instead in the meantime.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thejoshsmith/commerce-xero/pull/10#issuecomment-861080137, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKCPK25KUBNRSRQV5EL2PLTS2NLRANCNFSM46IONZXQ .

moacode commented 3 years ago

@judereid I finally got around to this! Looks great mate, thanks for that. I see you have a branch for naturalpaintco and dinefindβ€”Did you want to get that line item event in here too and I'll merge them all together?

judereid commented 3 years ago

@thejoshsmith Nice! Yeah cool, I've pulled in the LineItem one too which is handy for customising the line item descriptions etc. We've been using this in prod across both those projects for a while and haven't had any issues.

FYI as well as #7, you can solve #11 and #8 by setting $event->invoice->setLineAmountType('Inclusive'); in the InvoiceEvent listener.

moacode commented 3 years ago

Awesome, thanks @judereid!

moacode commented 3 years ago

We've been using this in prod across both those projects for a while and haven't had any issues.

Were you planning on purchasing licenses? πŸ˜›πŸ˜›πŸ˜›

judereid commented 3 years ago

Were you planning on purchasing licenses? πŸ˜›πŸ˜›πŸ˜›

Will you accept code and a cheese scone as payment? πŸ˜…

I'll chase it up today!

moacode commented 3 years ago

Were you planning on purchasing licenses? πŸ˜›πŸ˜›πŸ˜›

Will you accept code and a cheese scone as payment? πŸ˜…

Oh mannnn, I haven't had one of those in a long time. Definitely YES!