Merge pull request #2 from sempervictus/local

Merge initial changes 20170103
This commit is contained in:
RageLtMan
2017-01-03 04:34:58 -05:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ gem 'oauth-plugin'
gem 'oauth'
gem 'roxml'
gem 'edmunds_vin'
gem 'will_paginate', '~> 3.1.0'
gem 'will_paginate'
group :assets do
gem 'coffee-rails'

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