mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Display default xero invoice dates
fixes #682 * pre-fill the invoice_date and due_date in the xero report generation form * increase the default period between invoice_date and due_date to 1 month in XeroInvoiceReport
This commit is contained in:
@@ -244,7 +244,9 @@ Spree::Admin::ReportsController.class_eval do
|
||||
def xero_invoices
|
||||
if request.get?
|
||||
params[:q] ||= {}
|
||||
params[:q][:completed_at_gt] = Time.zone.now.beginning_of_month
|
||||
params[:q][:completed_at_gt] = Time.zone.today.beginning_of_month
|
||||
params[:invoice_date] = Time.zone.today
|
||||
params[:due_date] = Time.zone.today + 1.month
|
||||
end
|
||||
@distributors = Enterprise.is_distributor.managed_by(spree_current_user)
|
||||
@order_cycles = OrderCycle.active_or_complete.accessible_by(spree_current_user).order('orders_close_at DESC')
|
||||
|
||||
Reference in New Issue
Block a user