Merge branch 'master' of git://github.com/sempervictus/redmine_qbo into sempervictus-master

This commit is contained in:
2017-02-22 11:10:46 -05:00
3 changed files with 8 additions and 4 deletions

View File

@@ -66,8 +66,12 @@ class QboController < ApplicationController
# Manual Billing
def bill
i = Issue.find_by_id params[:id]
i.bill_time
redirect_to i, :flash => { :notice => "Successfully Billed #{i.customer.name}" }
if i.customer
i.bill_time
redirect_to i, :flash => { :notice => "Successfully Billed #{i.customer.name}" }
else
redirect_to i, :flash => { :error => "Cannot bill without a customer assigned" }
end
end
# Quickbooks Webhook Callback