quickbooks-ruby icon indicating copy to clipboard operation
quickbooks-ruby copied to clipboard

Delete customer who has open balance

Open puneetimpinge opened this issue 7 years ago • 4 comments

How can I delete a customer who has open balance?

oauth_client = OAuth::AccessToken.new($qb_oauth_consumer, qbo.token, qbo.secret) @service = Quickbooks::Service::Customer.new @service.access_token = oauth_client @service.realm_id = qbo.realm_id

customer = @service.find_by(:company_name, @store.name).first @service.delete(customer)

Error message:

Quickbooks::IntuitRequestException: Delete List Has Balance Error: The entity you are trying to delete has an open balance. : This customer cannot be deleted because it has a non-zero balance

puneetimpinge avatar Jul 21 '17 09:07 puneetimpinge

Yep. You cannot delete^1 a Customer with an open balance.

^1 FWIW: Technically, you can't delete a name list resource. You are attempting to de-activate a Customer (active = false).

On Fri, Jul 21, 2017 at 5:05 AM, puneetimpinge [email protected] wrote:

How can I delete a customer who has open balance?

oauth_client = OAuth::AccessToken.new($qb_oauth_consumer, qbo.token, qbo.secret) @service https://github.com/service = Quickbooks::Service::Customer.new @service.access_token = oauth_client @service.realm_id = qbo.realm_id

customer = @service https://github.com/service.find_by(:company_name, @ store.name).first @service.delete(customer)

Error message:

Quickbooks::IntuitRequestException: Delete List Has Balance Error: The entity you are trying to delete has an open balance. : This customer cannot be deleted because it has a non-zero balance

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ruckus/quickbooks-ruby/issues/390, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMMtjofXAA9SY-Y4t3738QrP4R9ClPZks5sQGnFgaJpZM4OfJSL .

minimul avatar Jul 21 '17 12:07 minimul

Is there any way in apis to deactivate a customer?

puneetimpinge avatar Jul 24 '17 06:07 puneetimpinge

Do a sparse update sending active: false in the payload`

On Mon, Jul 24, 2017 at 2:53 AM, puneetimpinge [email protected] wrote:

Is there any way in apis to deactivate a customer?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ruckus/quickbooks-ruby/issues/390#issuecomment-317334856, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMMtsi6DcPA25Y42_89T1hCXXHPGzKUks5sRD9_gaJpZM4OfJSL .

minimul avatar Jul 24 '17 13:07 minimul

Do a sparse update sending active: false in the payload` On Mon, Jul 24, 2017 at 2:53 AM, puneetimpinge @.***> wrote: Is there any way in apis to deactivate a customer? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#390 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMMtsi6DcPA25Y42_89T1hCXXHPGzKUks5sRD9_gaJpZM4OfJSL .

it doesn't help

PhoenixUA avatar Sep 21 '22 21:09 PhoenixUA