mirror of
https://github.com/rickbarrette/redmine_qbo_labels.git
synced 2026-11-17 17:50:36 -05:00
Print label in the sidebar, filled in from the page
A Labels section in the sidebar of every page: Print label fills the label in from the page's customer (their name), estimate, invoice, appointment (its customer and estimate) or work order, or opens a blank label anywhere else. When there's a customer, the PO number field offers their latest estimates, invoices and open work orders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e29f14f76
commit
98a9bcc1bf
11 files changed
+239
-18
No files matched your search
@@ -31,6 +31,18 @@ module QboLabelsTestHelper
|
||||
LabelJob.create!({ label_printer: printer, user: user, lines: lines, status: status }.merge(attributes))
|
||||
end
|
||||
|
||||
# A customer, without sending it to QuickBooks
|
||||
def create_customer(id: 9001, name: 'Jane Smith')
|
||||
customer = Customer.new(id: id, name: name)
|
||||
customer.skip_qbo_push = true
|
||||
customer.save!
|
||||
customer
|
||||
end
|
||||
|
||||
def create_estimate(customer, id: '8001', doc_number: '1234', txn_date: Date.new(2026, 11, 2))
|
||||
Estimate.create!(id: id, doc_number: doc_number, txn_date: txn_date, customer: customer)
|
||||
end
|
||||
|
||||
def with_label_settings(values)
|
||||
saved = Setting.plugin_redmine_qbo_labels
|
||||
Setting.plugin_redmine_qbo_labels = RedmineQboLabels::Settings::DEFAULTS.merge(values)
|
||||
|
||||
Reference in new issue
Block a user