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

This commit is contained in:
ricky committed 2017-02-22 11:10:46 -05:00
commit 4da891cc07
3 files changed
+8 -4

No files matched your search

+6 -2
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