Ubiquiti-App / UCRM-plugins

Plugins for UCRM - Complete WISP Management Platform
https://ucrm.ubnt.com/
MIT License
61 stars 102 forks source link

Quickbooks plugin import breaks with invoice present #173

Open davidandrewcope opened 4 years ago

davidandrewcope commented 4 years ago

In UNMS if I convert a lead to a customer, create an invoice and take payment for their service on the same day. The QB plugin will always fail with [error] Client with Display name containing: UCRMID-99 is not found.

This does not happen if I convert them to a customer and do not collect payment or invoice on the same day.

It may be that the plugin needs to try import all customers before attempting invoice and payment imports.

raymondjclark commented 4 years ago

The plugin does indeed export customers before invoices or payments. Can you provide a little more log data around this error?

timbze commented 2 years ago

My theory, from working on #230 and looking at the code; after a lead is created and sync is run, the customer is skipped (leads don't get created in QBO). Later when it's converted to customer it does not sync because the id for it has already been skipped.

Probably the easiest way to fix this would be to create the customer when it's not found.

raymondjclark commented 2 years ago

Or, create a customer in QBO when a lead is created and be done with it. One would have to manually delete the customer in QBO if the lead does not turn into a customer.

From: Timmy Braun @.> Sent: Thursday, December 9, 2021 9:02 AM To: Ubiquiti-App/UCRM-plugins @.> Cc: raymondjclark @.>; Comment @.> Subject: Re: [Ubiquiti-App/UCRM-plugins] Quickbooks plugin import breaks with invoice present (#173)

My theory, from working on #230 https://github.com/Ubiquiti-App/UCRM-plugins/pull/230 and looking at the code; after a lead is created and sync is run, the customer is skipped (leads don't get created in QBO). Later when it's converted to customer it does not sync because the id for it has already been skipped.

Probably the easiest way to fix this would be to create the customer when it's not found.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ubiquiti-App/UCRM-plugins/issues/173#issuecomment-989988237 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5YBM3C3C3GGXSOVBPVJ3TUQDHI7ANCNFSM4JUKHD4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . https://github.com/notifications/beacon/AH5YBMYTTBO2ZH2ZAK2D2QTUQDHI7A5CNFSM4JUKHD42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHMBALDI.gif