mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
Blank VIN on new documents; VIN from attached estimates; read estimate VINs with newer custom fields
- New estimates and invoices start with a blank VIN; picking a customer only fills the VIN box's suggestions. - Importing an estimate whose work orders give no VIN fills the invoice's VIN box with the estimate's own VIN (open estimates now carry it). - EstimateWriter.vin_for reads an estimate's VIN with QuickBooks' newer custom fields (cached a minute). The local Estimate's details leave those out, so plugins matching the estimate's VIN to a vehicle never found one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
5 files changed
+40
-20
No files matched your search
@@ -43,10 +43,11 @@ module RedmineQboBilling
|
||||
[]
|
||||
end
|
||||
|
||||
# The VIN a new estimate or invoice starts with, from plugins answering
|
||||
# The VIN for a document's work orders, from plugins answering
|
||||
# :qbo_billing_default_vin, { customer:, issues: } => a VIN or nil (e.g. redmine_qbo_vehicles: the work
|
||||
# orders' vehicle when they share one, else the customer's only vehicle)
|
||||
# issues are the work orders behind the document (e.g. the issues linked to the estimate it's made from).
|
||||
# orders' vehicle when they share one)
|
||||
# Used for an invoice made from an estimate that has no VIN (issues: the estimate's work orders). New
|
||||
# estimates and invoices start with a blank VIN.
|
||||
def self.default_vin(customer, issues: [])
|
||||
return nil unless customer
|
||||
|
||||
|
||||
Reference in new issue
Block a user