Fix a lot.

Add export to contract and inviting.
This commit is contained in:
BoHung Chiu 2020-10-27 10:41:08 +08:00
parent e6b4c261d3
commit 1a18f73780
28 changed files with 553 additions and 68 deletions

View File

@ -64,19 +64,22 @@ class Admin::VenueManagementBillsController < Admin::VenueAdminController
end
accounting_month_start = DateTime.parse(params[:filters]["accounting_month_start"]) rescue 0
accounting_month_end = DateTime.parse(params[:filters]["accounting_month_end"]) rescue 0
if(accounting_month_end != 0)
accounting_month_end = accounting_month_end + 1.month - 1.day
end
if @bills.nil?
if accounting_month_start != 0 && accounting_month_end != 0
@bills = VenueManagementBill.where(:accounting_month.gt=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
@bills = VenueManagementBill.where(:accounting_month.gte=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
elsif accounting_month_start != 0
@bills = VenueManagementBill.where(:accounting_month.gt=>accounting_month_start).page(params[:page]).per(10)
@bills = VenueManagementBill.where(:accounting_month.gte=>accounting_month_start).page(params[:page]).per(10)
elsif accounting_month_end != 0
@bills = VenueManagementBill.where(:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
end
else
if accounting_month_start != 0 && accounting_month_end != 0
@bills = @bills.where(:accounting_month.gt=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
@bills = @bills.where(:accounting_month.gte=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
elsif accounting_month_start != 0
@bills = @bills.where(:accounting_month.gt=>accounting_month_start).page(params[:page]).per(10)
@bills = @bills.where(:accounting_month.gte=>accounting_month_start).page(params[:page]).per(10)
elsif accounting_month_end != 0
@bills = @bills.where(:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
end
@ -151,7 +154,7 @@ class Admin::VenueManagementBillsController < Admin::VenueAdminController
filter_tags = params[:filters]["type"].to_a rescue []
@main_ids = nil
if !filter_tags.blank?
filename += (I18n.t("vm_bill.type") + ": #{Tag.where(:id.in=>filter_tags).map{|t| t.name}.join(',')}")
filename += (I18n.t("vm_inviting.type") + ": #{Tag.where(:id.in=>filter_tags).map{|t| t.name}.join(',')}")
@main_ids = VenueManagementInviting.with_tags(filter_tags).pluck(:venue_management_main_id)
if !filters("category").blank?
@main_ids = VenueManagementMain.where(:id.in=>@main_ids).with_categories(filters("category")).pluck(:id)
@ -165,13 +168,16 @@ class Admin::VenueManagementBillsController < Admin::VenueAdminController
end
accounting_month_start = DateTime.parse(params[:filters]["accounting_month_start"]) rescue 0
accounting_month_end = DateTime.parse(params[:filters]["accounting_month_end"]) rescue 0
if(accounting_month_end != 0)
accounting_month_end = accounting_month_end + 1.month - 1.day
end
if @bills.nil?
if accounting_month_start != 0 && accounting_month_end != 0
filename += (I18n.t("vm_bill.accounting_month") + ": #{accounting_month_start}~#{accounting_month_end}") if filename.blank?
@bills = VenueManagementBill.where(:accounting_month.gt=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
@bills = VenueManagementBill.where(:accounting_month.gte=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
elsif accounting_month_start != 0
filename += (I18n.t("vm_bill.accounting_month") + ": #{accounting_month_start}~") if filename.blank?
@bills = VenueManagementBill.where(:accounting_month.gt=>accounting_month_start).page(params[:page]).per(10)
@bills = VenueManagementBill.where(:accounting_month.gte=>accounting_month_start).page(params[:page]).per(10)
elsif accounting_month_end != 0
filename += (I18n.t("vm_bill.accounting_month") + ": ~#{accounting_month_end}") if filename.blank?
@bills = VenueManagementBill.where(:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
@ -199,6 +205,8 @@ class Admin::VenueManagementBillsController < Admin::VenueAdminController
@bills = VenueManagementBill.all.page(params[:page]).per(10)
elsif @bills.nil?
@bills = VenueManagementBill.where(:venue_management_main_id=>params[:id])
else
@bills = @bills.where(:venue_management_main_id=>params[:id])
end
@bills = @bills.page(1).per(@bills.count)
@protocol = (request.referer.blank? ? "http" : URI(request.referer).scheme)
@ -206,6 +214,7 @@ class Admin::VenueManagementBillsController < Admin::VenueAdminController
@site_in_use_locales = Site.first.in_use_locales
filename = "export_bills" if filename.blank?
filename = filename + "_export.xlsx"
@id = params[:id]
respond_to do |format|
format.xlsx {
response.headers['Content-Transfer-Encoding'] = 'binary'

View File

@ -5,6 +5,11 @@ class Admin::VenueManagementContractsController < Admin::VenueAdminController
before_action ->(module_app = @app_title) { set_variables module_app }
before_action :set_venue_management_contract, only: [:edit, :update, :destroy]
def filter_fields(categories)
{
:category=>categories.map{|c| {:title=>(c.title.blank? ? " " : c.title), :id=>c.id}}
}
end
def initialize
super
@app_title = 'venue_management'
@ -29,13 +34,69 @@ class Admin::VenueManagementContractsController < Admin::VenueAdminController
'vm_inviting.rents',
'vm_inviting.royalty',
'vm_contract.start_end',
'vm_contract.deposit_amount_type_exp_date',
'vm_contract.renewal_permission',
'vm_contract.note',
'vm_contract.other_commitment',
'vm_contract.note'
]
@contracts = VenueManagementContract.order(updated_at: :desc).page(params[:page]).per(10)
@filter_fields = filter_fields(@categories)
@tags = @module_app.tags
@filter_fields['vm_inviting.type'] = @tags.map{|t| {:title => t.name,:id => t.id} }
@filter_fields['vm_contract.start_end'] = ('<form><div class="controls"><div style="float: left;">'+
(render_html('<%= org_datetime_picker("filters[contract_start_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["contract_start_date"]) rescue nil)}) %>')) +
"</div><span style=\"float: left;\">~</span><div style=\"float: left;\">" +
(render_html('<%= org_datetime_picker("filters[contract_end_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["contract_end_date"]) rescue nil)}) %>' ) ) +
render_html("<%= submit_tag(I18n.t('venue_management.search')) %>") +
'</div></div></form>')
filter_tags = params[:filters]["type"].to_a rescue []
@main_ids = nil
@inviting_ids = nil
if !filter_tags.blank?
@inviting_ids = VenueManagementInviting.with_tags(filter_tags).pluck(:id)
end
if !filters("category").blank?
@main_ids = VenueManagementMain.all.with_categories(filters("category")).pluck(:id)
end
contract_start_date = DateTime.parse(params[:filters]["contract_start_date"]) rescue 0
contract_end_date = DateTime.parse(params[:filters]["contract_end_date"]) rescue 0
if @contracts.nil?
if contract_start_date != 0 && contract_end_date != 0
@contracts = VenueManagementContract.where(:contract_start_date.gte=>contract_start_date,:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
elsif contract_start_date != 0
@contracts = VenueManagementContract.where(:contract_start_date.gte=>contract_start_date).page(params[:page]).per(10)
elsif contract_end_date != 0
@contracts = VenueManagementContract.where(:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
end
else
if contract_start_date != 0 && contract_end_date != 0
@contracts = @contracts.where(:contract_start_date.gte=>contract_start_date,:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
elsif contract_start_date != 0
@contracts = @contracts.where(:contract_start_date.gte=>contract_start_date).page(params[:page]).per(10)
elsif contract_end_date != 0
@contracts = @contracts.where(:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
end
end
if !@main_ids.nil?
if @contracts.nil?
@contracts = VenueManagementContract.where(:venue_management_main_id.in=>@main_ids).page(params[:page]).per(10)
else
@contracts = @contracts.where(:venue_management_main_id.in=>@main_ids).page(params[:page]).per(10)
end
end
if @contracts.nil?
@contracts = VenueManagementContract.all.page(params[:page]).per(10)
end
if !@inviting_ids.nil?
@contracts = @contracts.where(:venue_management_inviting_id.in=>@inviting_ids)
end
@contracts = @contracts.order(updated_at: :desc).page(params[:page]).per(10)
@venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
end
def render_html(code,pass_variables={})
render_to_string(:inline=>code,:locals=>pass_variables)
end
def new
@venue_management = VenueManagementMain.find(params[:id])
@venue_management_contract = @venue_management.venue_management_contracts.build
@ -65,7 +126,77 @@ class Admin::VenueManagementContractsController < Admin::VenueAdminController
redirect_to venue_management_contracts_admin_venue_management_path(@venue_management_main_id)
end
def export
filename = ""
filter_tags = params[:filters]["type"].to_a rescue []
@main_ids = nil
@inviting_ids = nil
if !filter_tags.blank?
filename += (I18n.t("vm_bill.type") + ": #{Tag.where(:id.in=>filter_tags).map{|t| t.name}.join(',')}")
@inviting_ids = VenueManagementInviting.with_tags(filter_tags).pluck(:id)
end
if !filters("category").blank?
filename += (I18n.t(:category) + ": #{Category.where(:id.in=>filters("category")).map{|t| t.title}.join(',')}") if filename.blank?
@main_ids = VenueManagementMain.all.with_categories(filters("category")).pluck(:id)
end
contract_start_date = DateTime.parse(params[:filters]["contract_start_date"]) rescue 0
contract_end_date = DateTime.parse(params[:filters]["contract_end_date"]) rescue 0
if @contracts.nil?
if contract_start_date != 0 && contract_end_date != 0
filename += (I18n.t("vm_bill.accounting_month") + ": #{contract_start_date}~#{contract_end_date}") if filename.blank?
@contracts = VenueManagementContract.where(:contract_start_date.gte=>contract_start_date,:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
elsif contract_start_date != 0
filename += (I18n.t("vm_bill.accounting_month") + ": #{contract_start_date}~") if filename.blank?
@contracts = VenueManagementContract.where(:contract_start_date.gte=>contract_start_date).page(params[:page]).per(10)
elsif contract_end_date != 0
filename += (I18n.t("vm_bill.accounting_month") + ": ~#{contract_end_date}") if filename.blank?
@contracts = VenueManagementContract.where(:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
end
else
if contract_start_date != 0 && contract_end_date != 0
filename += (I18n.t("vm_bill.accounting_month") + ": #{contract_start_date}~#{contract_end_date}") if filename.blank?
@contracts = @contracts.where(:contract_start_date.gte=>contract_start_date,:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
elsif contract_start_date != 0
filename += (I18n.t("vm_bill.accounting_month") + ": #{contract_start_date}~") if filename.blank?
@contracts = @contracts.where(:contract_start_date.gte=>contract_start_date).page(params[:page]).per(10)
elsif contract_end_date != 0
filename += (I18n.t("vm_bill.accounting_month") + ": ~#{contract_end_date}") if filename.blank?
@contracts = @contracts.where(:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
end
end
if !@main_ids.nil?
if @contracts.nil?
@contracts = VenueManagementContract.where(:venue_management_main_id.in=>@main_ids).page(params[:page]).per(10)
else
@contracts = @contracts.where(:venue_management_main_id.in=>@main_ids).page(params[:page]).per(10)
end
end
if @contracts.nil?
@contracts = VenueManagementContract.all.page(params[:page]).per(10)
end
if !@inviting_ids.nil?
@contracts = @contracts.where(:venue_management_inviting_id.in=>@inviting_ids)
end
if params[:id].present?
filename = "#{VenueManagementMain.find(params[:id]).title rescue ''}_export_invitings" if filename.blank?
@contracts = @contracts.and(:venue_management_main_id=>params[:id])
end
@contracts = @contracts.order(updated_at: :desc).page(1).per(@contracts.count)
@protocol = (request.referer.blank? ? "http" : URI(request.referer).scheme)
@host = "#{@protocol}://#{request.host_with_port}"
@site_in_use_locales = Site.first.in_use_locales
filename = "export_contracts" if filename.blank?
filename = filename + "_export.xlsx"
@id = params[:id]
respond_to do |format|
format.xlsx {
response.headers['Content-Transfer-Encoding'] = 'binary'
response.headers['Content-Type'] = 'binary/octet-stream'
response.headers['Content-Disposition'] = 'attachment; filename="' + filename + '"'
}
end
render :layout => false
end
private
def set_venue_management_contract

View File

@ -22,12 +22,38 @@ class Admin::VenueManagementInvitingsController < Admin::VenueAdminController
'vm_inviting.house_land_tax_payer',
'vm_inviting.contractor_manager',
'vm_inviting.bid_result',
'vm_inviting.details'
]
@tags = @module_app.tags
@filter_fields = {}
@filter_fields['vm_inviting.type'] = @tags.map{|t| {:title => t.name,:id => t.id} }
@filter_fields['vm_inviting.start_end'] = ('<form><div class="controls"><div style="float: left;">'+
(render_html('<%= org_datetime_picker("filters[start_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["start_date"]) rescue nil)}) %>')) +
"</div><span style=\"float: left;\">~</span><div style=\"float: left;\">" +
(render_html('<%= org_datetime_picker("filters[end_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["end_date"]) rescue nil)}) %>' ) ) +
render_html("<%= submit_tag(I18n.t('venue_management.search')) %>") +
'</div></div></form>')
filter_tags = params[:filters]["type"].to_a rescue []
start_date = DateTime.parse(params[:filters]["start_date"]) rescue 0
end_date = DateTime.parse(params[:filters]["end_date"]) rescue 0
@invitings = VenueManagementInviting.with_tags(filter_tags).order(updated_at: :desc).page(params[:page]).per(10)
if @invitings.nil?
if start_date != 0 && end_date != 0
@invitings = VenueManagementInviting.where(:start_date.gte=>start_date,:end_date.lte=>end_date).page(params[:page]).per(10)
elsif start_date != 0
@invitings = VenueManagementInviting.where(:start_date.gte=>start_date).page(params[:page]).per(10)
elsif end_date != 0
@invitings = VenueManagementInviting.where(:end_date.lte=>end_date).page(params[:page]).per(10)
end
else
if start_date != 0 && end_date != 0
@invitings = @invitings.where(:start_date.gte=>start_date,:end_date.lte=>end_date).page(params[:page]).per(10)
elsif start_date != 0
@invitings = @invitings.where(:start_date.gte=>start_date).page(params[:page]).per(10)
elsif end_date != 0
@invitings = @invitings.where(:end_date.lte=>end_date).page(params[:page]).per(10)
end
end
@venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
if request.xhr?
render :partial => 'index'
@ -62,7 +88,46 @@ class Admin::VenueManagementInvitingsController < Admin::VenueAdminController
redirect_to venue_management_invitings_admin_venue_management_path(@venue_management_main_id)
end
def render_html(code,pass_variables={})
render_to_string(:inline=>code,:locals=>pass_variables)
end
def export
filename = ""
filter_tags = params[:filters]["type"].to_a rescue []
start_date = DateTime.parse(params[:filters]["start_date"]) rescue 0
end_date = DateTime.parse(params[:filters]["end_date"]) rescue 0
@invitings = VenueManagementInviting.with_tags(filter_tags).order(updated_at: :desc).page(params[:page]).per(10)
filename += (I18n.t("vm_inviting.type") + ": #{Tag.where(:id.in=>filter_tags).map{|t| t.name}.join(',')}") if !filter_tags.blank?
if start_date != 0 && end_date != 0
filename += (I18n.t("vm_inviting.start_end") + ": #{start_date}~#{end_date}") if filename.blank?
@invitings = @invitings.where(:start_date.gte=>start_date,:end_date.lte=>end_date).page(params[:page]).per(10)
elsif start_date != 0
filename += (I18n.t("vm_inviting.start_end") + ": #{start_date}~") if filename.blank?
@invitings = @invitings.where(:start_date.gte=>start_date).page(params[:page]).per(10)
elsif end_date != 0
filename += (I18n.t("vm_inviting.start_end") + ": ~#{end_date}") if filename.blank?
@invitings = @invitings.where(:end_date.lte=>end_date).page(params[:page]).per(10)
end
if params[:id].present?
filename = "#{VenueManagementMain.find(params[:id]).title rescue ''}_export_invitings" if filename.blank?
@invitings = @invitings.where(:venue_management_main_id=>params[:id])
end
@invitings = @invitings.page(1).per(@invitings.count)
@protocol = (request.referer.blank? ? "http" : URI(request.referer).scheme)
@host = "#{@protocol}://#{request.host_with_port}"
@site_in_use_locales = Site.first.in_use_locales
filename = "export_invitings" if filename.blank?
filename = filename + "_export.xlsx"
@id = params[:id]
respond_to do |format|
format.xlsx {
response.headers['Content-Transfer-Encoding'] = 'binary'
response.headers['Content-Type'] = 'binary/octet-stream'
response.headers['Content-Disposition'] = 'attachment; filename="' + filename + '"'
}
end
render :layout => false
end
private
def set_venue_management_inviting

View File

@ -312,12 +312,38 @@ class Admin::VenueManagementsController < Admin::VenueAdminController
'vm_inviting.house_land_tax_payer',
'vm_inviting.contractor_manager',
'vm_inviting.bid_result',
'vm_inviting.details'
]
filter_tags = params[:filters]["type"].to_a rescue []
@invitings = @venue_management.venue_management_invitings.with_tags(filter_tags).page(params[:page]).per(10)
@tags = @module_app.tags
@filter_fields = {}
@filter_fields['vm_inviting.type'] = @tags.map{|t| {:title => t.name,:id => t.id} }
@filter_fields['vm_inviting.start_end'] = ('<form><div class="controls"><div style="float: left;">'+
(render_html('<%= org_datetime_picker("filters[start_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["start_date"]) rescue nil)}) %>')) +
"</div><span style=\"float: left;\">~</span><div style=\"float: left;\">" +
(render_html('<%= org_datetime_picker("filters[end_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["end_date"]) rescue nil)}) %>' ) ) +
render_html("<%= submit_tag(I18n.t('venue_management.search')) %>") +
'</div></div></form>')
start_date = DateTime.parse(params[:filters]["start_date"]) rescue 0
end_date = DateTime.parse(params[:filters]["end_date"]) rescue 0
if @invitings.nil?
if start_date != 0 && end_date != 0
@invitings = VenueManagementInviting.where(:start_date.gte=>start_date,:end_date.lte=>end_date).page(params[:page]).per(10)
elsif start_date != 0
@invitings = VenueManagementInviting.where(:start_date.gte=>start_date).page(params[:page]).per(10)
elsif end_date != 0
@invitings = VenueManagementInviting.where(:end_date.lte=>end_date).page(params[:page]).per(10)
end
else
if start_date != 0 && end_date != 0
@invitings = @invitings.where(:start_date.gte=>start_date,:end_date.lte=>end_date).page(params[:page]).per(10)
elsif start_date != 0
@invitings = @invitings.where(:start_date.gte=>start_date).page(params[:page]).per(10)
elsif end_date != 0
@invitings = @invitings.where(:end_date.lte=>end_date).page(params[:page]).per(10)
end
end
@venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
if request.xhr?
render :partial => 'admin/venue_management_invitings/index'
@ -381,10 +407,13 @@ class Admin::VenueManagementsController < Admin::VenueAdminController
end
accounting_month_start = DateTime.parse(params[:filters]["accounting_month_start"]) rescue 0
accounting_month_end = DateTime.parse(params[:filters]["accounting_month_end"]) rescue 0
if(accounting_month_end != 0)
accounting_month_end = accounting_month_end + 1.month - 1.day
end
if accounting_month_start != 0 && accounting_month_end != 0
@bills = @bills.where(:accounting_month.gt=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
@bills = @bills.where(:accounting_month.gte=>accounting_month_start,:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
elsif accounting_month_start != 0
@bills = @bills.where(:accounting_month.gt=>accounting_month_start).page(params[:page]).per(10)
@bills = @bills.where(:accounting_month.gte=>accounting_month_start).page(params[:page]).per(10)
elsif accounting_month_end != 0
@bills = @bills.where(:accounting_month.lte=>accounting_month_end).page(params[:page]).per(10)
end
@ -404,10 +433,64 @@ class Admin::VenueManagementsController < Admin::VenueAdminController
'vm_inviting.rents',
'vm_inviting.royalty',
'vm_contract.start_end',
'vm_contract.deposit_amount_type_exp_date',
'vm_contract.renewal_permission',
'vm_contract.note',
'vm_contract.other_commitment',
'vm_contract.note'
]
@filter_fields = filter_fields(@categories)
@tags = @module_app.tags
@filter_fields['vm_inviting.type'] = @tags.map{|t| {:title => t.name,:id => t.id} }
@filter_fields['vm_contract.start_end'] = ('<form><div class="controls"><div style="float: left;">'+
(render_html('<%= org_datetime_picker("filters[contract_start_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["contract_start_date"]) rescue nil)}) %>')) +
"</div><span style=\"float: left;\">~</span><div style=\"float: left;\">" +
(render_html('<%= org_datetime_picker("filters[contract_end_date]", {:no_label => true, :format=>"yyyy/MM/dd", :new_record=>false, :value=>(DateTime.parse(params[:filters]["contract_end_date"]) rescue nil)}) %>' ) ) +
render_html("<%= submit_tag(I18n.t('venue_management.search')) %>") +
'</div></div></form>')
filter_tags = params[:filters]["type"].to_a rescue []
@main_ids = nil
@inviting_ids = nil
@contracts = @venue_management.venue_management_contracts.page(params[:page]).per(10)
if !filter_tags.blank?
@inviting_ids = VenueManagementInviting.with_tags(filter_tags).pluck(:id)
end
if !filters("category").blank?
@main_ids = VenueManagementMain.all.with_categories(filters("category")).pluck(:id)
end
contract_start_date = DateTime.parse(params[:filters]["contract_start_date"]) rescue 0
contract_end_date = DateTime.parse(params[:filters]["contract_end_date"]) rescue 0
if @contracts.nil?
if contract_start_date != 0 && contract_end_date != 0
@contracts = VenueManagementContract.where(:contract_start_date.gte=>contract_start_date,:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
elsif contract_start_date != 0
@contracts = VenueManagementContract.where(:contract_start_date.gte=>contract_start_date).page(params[:page]).per(10)
elsif contract_end_date != 0
@contracts = VenueManagementContract.where(:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
end
else
if contract_start_date != 0 && contract_end_date != 0
@contracts = @contracts.where(:contract_start_date.gte=>contract_start_date,:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
elsif contract_start_date != 0
@contracts = @contracts.where(:contract_start_date.gte=>contract_start_date).page(params[:page]).per(10)
elsif contract_end_date != 0
@contracts = @contracts.where(:contract_end_date.lte=>contract_end_date).page(params[:page]).per(10)
end
end
if !@main_ids.nil?
if @contracts.nil?
@contracts = VenueManagementContract.where(:venue_management_main_id.in=>@main_ids).page(params[:page]).per(10)
else
@contracts = @contracts.and(:venue_management_main_id.in=>@main_ids).page(params[:page]).per(10)
end
end
if @contracts.nil?
@contracts = VenueManagementContract.all.page(params[:page]).per(10)
end
if !@inviting_ids.nil?
@contracts = @contracts.where(:venue_management_inviting_id.in=>@inviting_ids)
end
@contracts = @contracts.order(updated_at: :desc)
@venue_management_page_url = Page.where(:module =>"venue_management").last.url rescue ""
end
def render_html(code,pass_variables={})

View File

@ -181,6 +181,10 @@ class VenueManagementBill
# venue_management_main.update(venue_management_main.venue_management_bill_ids.push(record.id))
# end
# end
def display_note
html = self.note.to_s.split("\r\n").select{|s| !s.blank?}.first
return Nokogiri::HTML(html).css("body").text
end
def display_caculation_basis
caculation_basis_val = eval("#{self.class::CACULATIONBASIS[self.caculation_basis_type]}")
return "#{I18n.t("vm_bill.#{self.class::CACULATIONBASIS[self.caculation_basis_type]}")}: #{caculation_basis_val}"

View File

@ -62,6 +62,17 @@ class VenueManagementContract
belongs_to :venue_management_main
belongs_to :venue_management_inviting
include VenueLinkFile
def deposit_amount_type_exp_date
return "#{self.deposit_amount}/#{self.deposit_type}/#{self.deposit_exp_date}"
end
def display_note
html = self.note.to_s.split("\r\n").select{|s| !s.blank?}.first
return Nokogiri::HTML(html).css("body").text
end
def display_other_commitment
html = self.other_commitment.to_s.split("\r\n").select{|s| !s.blank?}.first
return Nokogiri::HTML(html).css("body").text
end
def display_royalty
self.royalty.to_s.gsub("\r\n","<br>").html_safe
end

View File

@ -45,6 +45,10 @@ class VenueManagementInviting
def display_case_no
return (self.case_no.blank? ? I18n.t(:empty) : self.case_no)
end
def display_details
html = self.details.to_s.split("\r\n").select{|s| !s.blank?}.first
return Nokogiri::HTML(html).css("body").text
end
before_save do
contracts = self.venue_management_contracts
org_inviting = VenueManagementInviting.find(self.id) rescue nil

View File

@ -16,4 +16,8 @@ class VenueManagementMemorabilia
belongs_to :venue_management_inviting
belongs_to :venue_management_main
include VenueLinkFile
def display_details
html = self.details.to_s.split("\r\n").select{|s| !s.blank?}.first
return Nokogiri::HTML(html).css("body").text
end
end

View File

@ -371,7 +371,7 @@
name = name.replace('venue_management_bill','');
if(name.split('[').length == 2){
name = name.replace('[','').replace(']','');
eval.call(this,''+name+"="+Number(input.value).toString())
window[name] = Number(input.value);
}else{
var temp_arr = name.split("[").slice(1)
field_name = temp_arr[0].replace(']','');
@ -439,7 +439,7 @@
'
break;}').html_safe
%>
eval.call(this,formula);
eval.call(window,formula);
if($("#tax_excluded").prop("checked")){
$("#total_amount").val(Math.round(result*1.05));
$("#actual_amount").val(Math.round(result));

View File

@ -46,7 +46,7 @@
<td><%= bill.total_amount %></td>
<td><%= bill.pay_date %></td>
<td><%= bill.pay_method %></td>
<td><%= bill.note %></td>
<td><%= bill.display_note %></td>
</tr>
<% end %>
</tbody>

View File

@ -4,19 +4,16 @@ wb = xlsx_package.workbook
wb.add_worksheet(name: t('restful_actions.venue_management_bills')) do |sheet|
row = []
row << t('venue_management.title') if @id.blank?
row << t('venue_management.contractor')
row << t('vm_bill.accounting_month')
row << t('vm_bill.bill_type')
row << t('vm_bill.caculation_basis')
@site_in_use_locales.each do |locale|
row << t('vm_bill.reason') + " - " + t(locale)
end
@site_in_use_locales.each do |locale|
row << t('vm_bill.pay_method') + " - " + t(locale)
end
@site_in_use_locales.each do |locale|
row << t('vm_bill.note') + " - " + t(locale)
end
row << t('vm_bill.total_amount')
row << t('vm_bill.pay_date')
row << t('vm_bill.reason')
row << t('vm_bill.pay_method')
row << t('vm_bill.note')
row << t("link")
@site_in_use_locales.each do |locale|
row << t("link") + " " + t("url_alt") + " - " + t(locale)
@ -31,19 +28,16 @@ wb.add_worksheet(name: t('restful_actions.venue_management_bills')) do |sheet|
sheet.add_row row
@bills.each do |bill|
row2 = []
row2 << bill.venue_management_main.title if @id.blank?
row2 << (bill.contractor.display_contractors rescue "")
row2 << bill.display_accounting_month
row2 << "#{t("vm_bill.#{bill.bill_typeA}")}/#{t("vm_bill.#{bill.bill_typeB}")}"
row2 << bill.display_caculation_basis
@site_in_use_locales.each do |locale|
row2 << bill.reason_translations[locale]
end
@site_in_use_locales.each do |locale|
row2 << bill.pay_method_translations[locale]
end
@site_in_use_locales.each do |locale|
row2 << bill.note_translations[locale]
end
row2 << bill.total_amount
row2 << bill.pay_date
row2 << bill.reason
row2 << bill.pay_method
row2 << bill.note
row2 << bill.venue_management_links.map{|l| l.url.to_s.strip}.join(";")
@site_in_use_locales.each do |locale|
row2 << bill.venue_management_links.map{|l| l.title_translations[locale].to_s.strip}.join(";")

View File

@ -39,29 +39,40 @@
<td><%= contract.display_royalty %></td>
<td><%= "#{contract.contract_start_date} / #{contract.contract_end_date}" %></td>
<td><%= contract.deposit_amount_type_exp_date %></td>
<td><%= contract.renewal_permission.present? ? t("vm_contract.renewal.#{contract.renewal_permission}") : t("vm_contract.renewal.false") %></td>
<td><%= contract.note %></td>
<td><%= contract.display_other_commitment %></td>
<td><%= contract.display_note %></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@contracts), class: "pagination pagination-centered"
end
%>
<% filter_url = request.fullpath.split("?")[1..-1].join("?") %>
<% if @venue_management.present? %>
<% filter_url.blank? ? (filter_url += "id=#{@venue_management.id}") : (filter_url += "&id=#{@venue_management.id}") %>
<!-- footer -->
<div class="bottomnav clearfix">
<%= content_tag :div, class: "pagination pagination-centered" do %>
<%= content_tag :div, class: "pagination-centered" do %>
<%= paginate(@contracts) %>
<div class="action pull-right">
<%= link_to content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_contracts_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank' %>
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_contract_path(id: @venue_management.id), class: "btn btn-primary" %>
</div>
<% end %>
</div>
<!-- footer:end -->
<% else %>
<%=
content_tag :div, class: "bottomnav clearfix" do
(content_tag(:div, class: "pagination-centered") do
paginate(@contracts)
end) +
('<div class="action pull-right">'.html_safe +
link_to(content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_contracts_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank') +
'</div>'.html_safe)
end
%>
<% end %>
<style type="text/css">
.pagination-centered .pagination{

View File

@ -0,0 +1,87 @@
# encoding: utf-8
wb = xlsx_package.workbook
wb.add_worksheet(name: t('restful_actions.venue_management_contracts')) do |sheet|
row = []
row << t('venue_management.title') if @id.blank?
row << t('vm_contract.case_no')
row << t('vm_inviting.type')
row << t('venue_management.contractor')
row << t('vm_inviting.rents')
row << t('vm_inviting.royalty')
row << t('vm_inviting.house_land_tax_payer')
row << t('vm_contract.renewal_permission')
row << t('vm_contract.start_end')
row << t('vm_contract.construction_start_end')
row << t('vm_contract.operation_start_end')
row << t('vm_contract.free_period_start_end')
row << t('vm_contract.sign_date')
row << t('vm_contract.handover_date')
row << t('vm_contract.deposit_payment_date')
row << t('vm_contract.deposit_type')
row << t('vm_contract.deposit_exp_date')
row << t('vm_contract.insurance_type')
row << t('vm_contract.insurance_payment_deadline')
row << t('vm_contract.insurance_payment_date')
@site_in_use_locales.each do |locale|
row << t('vm_contract.other_commitment') + " - " + t(locale)
end
@site_in_use_locales.each do |locale|
row << t('vm_contract.note') + " - " + t(locale)
end
row << t("link")
@site_in_use_locales.each do |locale|
row << t("link") + " " + t("url_alt") + " - " + t(locale)
end
row << t("file_")
@site_in_use_locales.each do |locale|
row << t("file_") + " " + t("description") + " - " + t(locale)
end
@site_in_use_locales.each do |locale|
row << t("file_") + " " + t("alternative") + " - " + t(locale)
end
sheet.add_row row
@contracts.each do |contract|
row2 = []
row2 << contract.venue_management_main.title if @id.blank?
row2 << contract.case_no
row2 << contract.display_tags
row2 << contract.display_contractors
row2 << "#{contract.early_rent} / #{contract.operation_rent}"
row2 << contract.royalty
row2 << t("vm_inviting.enums.#{contract.house_tax_payer}")+"/"+t("vm_inviting.enums.#{contract.land_tax_payer}")
row2 << contract.renewal_permission.present? ? t("vm_contract.renewal.#{contract.renewal_permission}") : t("vm_contract.renewal.false")
row2 << "#{contract.contract_start_date} ~ #{contract.contract_end_date}"
row2 << "#{contract.construction_start_date} ~ #{contract.construction_end_date}"
row2 << "#{contract.operation_start_date} ~ #{contract.operation_end_date}"
row2 << "#{contract.free_period_start_date} ~ #{contract.free_period_end_date}"
row2 << contract.sign_date
row2 << contract.handover_date
row2 << contract.deposit_payment_date
row2 << contract.deposit_type
row2 << contract.deposit_exp_date
row2 << contract.insurance_type
row2 << contract.insurance_payment_deadline
row2 << contract.insurance_payment_date
@site_in_use_locales.each do |locale|
row2 << Nokogiri::HTML(contract.other_commitment_translations[locale].to_s).css("body").text
end
@site_in_use_locales.each do |locale|
row2 << Nokogiri::HTML(contract.note_translations[locale].to_s).css("body").text
end
row2 << contract.venue_management_links.map{|l| l.url.to_s.strip}.join(";")
@site_in_use_locales.each do |locale|
row2 << contract.venue_management_links.map{|l| l.title_translations[locale].to_s.strip}.join(";")
end
row2 << contract.venue_management_files.map{|f| @host + f.file.url rescue nil}.select{|s| !s.nil?}.join(";")
@site_in_use_locales.each do |locale|
row2 << contract.venue_management_files.map{|f| f.description_translations[locale].to_s.strip}.join(";")
end
@site_in_use_locales.each do |locale|
row2 << contract.venue_management_files.map{|f| f.title_translations[locale].to_s.strip}.join(";")
end
sheet.add_row row2
end
end

View File

@ -1,3 +1,4 @@
<%= render_filter @filter_fields, "index_table" %>
<span id="index_table">
<%= render 'index' %>
</span>

View File

@ -38,27 +38,36 @@
<td><%= t("vm_inviting.enums.#{inviting.house_tax_payer}") + "/" + t("vm_inviting.enums.#{inviting.land_tax_payer}") %></td>
<td><%= inviting.contractor_manager %></td>
<td><%= t("vm_inviting.enums.bid_result.#{inviting.bid_result}") %></td>
<td><%= inviting.display_details %></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@invitings), class: "pagination pagination-centered"
end
%>
<% filter_url = request.fullpath.split("?")[1..-1].join("?") %>
<% if @venue_management.present? %>
<% filter_url.blank? ? (filter_url += "id=#{@venue_management.id}") : (filter_url += "&id=#{@venue_management.id}") %>
<!-- footer -->
<div class="bottomnav clearfix">
<%= content_tag :div, class: "pagination pagination-centered" do %>
<%= content_tag :div, class: "pagination-centered" do %>
<%= paginate(@invitings) %>
<div class="action pull-right">
<%= link_to content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_invitings_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank' %>
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_inviting_path(id: @venue_management.id), class: "btn btn-primary" %>
</div>
<% end %>
</div>
<!-- footer:end -->
<% else %>
<%=
content_tag :div, class: "bottomnav clearfix" do
(content_tag(:div, class: "pagination-centered") do
paginate(@invitings)
end) +
('<div class="action pull-right">'.html_safe +
link_to(content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_invitings_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank') +
'</div>'.html_safe)
end
%>
<% end %>
<style type="text/css">
.pagination-centered .pagination{

View File

@ -0,0 +1,60 @@
# encoding: utf-8
wb = xlsx_package.workbook
wb.add_worksheet(name: t('restful_actions.venue_management_invitings')) do |sheet|
row = []
row << t('venue_management.title') if @id.blank?
row << t('vm_inviting.type')
row << t('vm_inviting.case_no')
row << t('vm_inviting.publish_times')
row << t('vm_inviting.rents')
row << t('vm_inviting.royalty')
row << t('vm_inviting.house_land_tax_payer')
row << t('vm_inviting.contractor_manager')
row << t('vm_inviting.bid_result')
@site_in_use_locales.each do |locale|
row << t('vm_inviting.details') + "-" + t(locale)
end
row << t("link")
@site_in_use_locales.each do |locale|
row << t("link") + " " + t("url_alt") + " - " + t(locale)
end
row << t("file_")
@site_in_use_locales.each do |locale|
row << t("file_") + " " + t("description") + " - " + t(locale)
end
@site_in_use_locales.each do |locale|
row << t("file_") + " " + t("alternative") + " - " + t(locale)
end
sheet.add_row row
@invitings.each do |inviting|
row2 = []
row2 << inviting.venue_management_main.title if @id.blank?
row2 << inviting.tags.map{|t| t.name}.join(" , ")
row2 << inviting.case_no
row2 << inviting.publish_times
row2 << "#{inviting.early_rent} / #{inviting.operation_rent}"
row2 << inviting.royalty
row2 << t("vm_inviting.enums.#{inviting.house_tax_payer}")+"/"+t("vm_inviting.enums.#{inviting.land_tax_payer}")
row2 << inviting.contractor_manager
row2 << t("vm_inviting.enums.bid_result.#{inviting.bid_result}")
@site_in_use_locales.each do |locale|
row2 << Nokogiri::HTML(inviting.details_translations[locale].to_s).css("body").text
end
row2 << inviting.venue_management_links.map{|l| l.url.to_s.strip}.join(";")
@site_in_use_locales.each do |locale|
row2 << inviting.venue_management_links.map{|l| l.title_translations[locale].to_s.strip}.join(";")
end
row2 << inviting.venue_management_files.map{|f| @host + f.file.url rescue nil}.select{|s| !s.nil?}.join(";")
@site_in_use_locales.each do |locale|
row2 << inviting.venue_management_files.map{|f| f.description_translations[locale].to_s.strip}.join(";")
end
@site_in_use_locales.each do |locale|
row2 << inviting.venue_management_files.map{|f| f.title_translations[locale].to_s.strip}.join(";")
end
sheet.add_row row2
end
end

View File

@ -30,7 +30,7 @@
</div>
</td>
<td><%= memorabilia.event_date %></td>
<td><%= memorabilia.details %></td>
<td><%= memorabilia.display_details %></td>
</tr>
<% end %>
</tbody>

View File

@ -176,7 +176,7 @@
</tr>
<tr class="control-group">
<th class="venue_managementive-title-field control-label muted"><%= t('vm_contract.other_commitment') %></th>
<td class="venue_managementive-title-value controls display_infos"><%= @venue_management_contract.other_commitment %></td>
<td class="venue_managementive-title-value controls display_infos"><%= @venue_management_contract.other_commitment.to_s.html_safe %></td>
</tr>
<tr class="control-group">
<th class="venue_managementive-title-field control-label muted"><%= t('vm_contract.note') %></th>

View File

@ -62,10 +62,10 @@ wb.add_worksheet(name: t('restful_actions.venue_management_contracts')) do |shee
row2 << contract.insurance_payment_deadline
row2 << contract.insurance_payment_date
@site_in_use_locales.each do |locale|
row2 << contract.other_commitment_translations[locale]
row2 << Nokogiri::HTML(contract.other_commitment_translations[locale].to_s).css("body").text
end
@site_in_use_locales.each do |locale|
row2 << contract.note_translations[locale]
row2 << Nokogiri::HTML(contract.note_translations[locale].to_s).css("body").text
end
row2 << contract.venue_management_links.map{|l| l.url.to_s.strip}.join(";")
@site_in_use_locales.each do |locale|
@ -119,7 +119,7 @@ wb.add_worksheet(name: t('restful_actions.venue_management_invitings')) do |shee
row2 << inviting.contractor_manager
row2 << t("vm_inviting.enums.bid_result.#{inviting.bid_result}")
@site_in_use_locales.each do |locale|
row2 << inviting.details_translations[locale]
row2 << Nokogiri::HTML(inviting.details_translations[locale].to_s).css("body").text
end
row2 << inviting.venue_management_links.map{|l| l.url.to_s.strip}.join(";")
@site_in_use_locales.each do |locale|
@ -159,7 +159,7 @@ wb.add_worksheet(name: t('restful_actions.venue_management_memorabilias')) do |s
row2 << memorabilia.case_no
row2 << memorabilia.event_date
@site_in_use_locales.each do |locale|
row2 << memorabilia.details_translations[locale]
row2 << Nokogiri::HTML(memorabilia.details_translations[locale].to_s).css("body").text
end
row2 << memorabilia.venue_management_links.map{|l| l.url.to_s.strip}.join(";")
@site_in_use_locales.each do |locale|

View File

@ -1,3 +1,4 @@
<%= render_filter @filter_fields, "index_table" %>
<span id="index_table">
<%= render 'admin/venue_management_contracts/index' %>
</span>

View File

@ -54,7 +54,7 @@
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_bill.note') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_bill.note %></td>
<td class="venue_managementive-title-value"><%= @venue_management_bill.note.to_s.html_safe %></td>
</tr>
<% if !@venue_management_bill.venue_management_files.blank? %>
<tr>

View File

@ -120,11 +120,11 @@
<% end %>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_contract.other_commitment') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_contract.other_commitment %></td>
<td class="venue_managementive-title-value"><%= @venue_management_contract.other_commitment.to_s.html_safe %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_contract.note') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_contract.note %></td>
<td class="venue_managementive-title-value"><%= @venue_management_contract.note.to_s.html_safe %></td>
</tr>
<% if !@venue_management_contract.venue_management_files.blank? %>
<tr>

View File

@ -189,11 +189,11 @@
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_contract.other_commitment') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_contract.other_commitment %></td>
<td class="venue_managementive-title-value"><%= @venue_management_contract.other_commitment.to_s.html_safe %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_contract.note') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_contract.note %></td>
<td class="venue_managementive-title-value"><%= @venue_management_contract.display_note %></td>
</tr>
<% if !@venue_management_contract.venue_management_files.blank? %>
<tr>
@ -240,6 +240,7 @@
'vm_contract.vendor',
'vm_contract.start_end',
'vm_contract.renewal_permission',
'vm_contract.other_commitment',
'vm_contract.note',
] %>
<% @table_fields.each do |th| %>
@ -257,7 +258,8 @@
<td><%= contract.display_contractors %></td>
<td><%= "#{contract.contract_start_date} / #{contract.contract_end_date}" %></td>
<td><%= contract.renewal_permission.present? ? t("vm_contract.renewal.#{contract.renewal_permission}") : t("vm_contract.renewal.false") %></td>
<td><%= contract.note %></td>
<td><%= contract.display_other_commitment %></td>
<td><%= contract.display_note %></td>
</tr>
<% end%>
</tbody>
@ -292,7 +294,7 @@
<%= link_to memorabilia.case_no, "/#{I18n.locale}"+@params[:url]+"/#{memorabilia.case_no.to_s.strip}-#{memorabilia.id}?method=show_memorabilia", :target => '_blank' %>
</td>
<td><%= memorabilia.event_date %></td>
<td><%= memorabilia.details %></td>
<td><%= memorabilia.display_details %></td>
</tr>
<% end %>
</tbody>
@ -313,6 +315,7 @@
'vm_inviting.house_land_tax_payer',
'vm_inviting.contractor_manager',
'vm_inviting.bid_result',
'vm_inviting.details'
]
@invitings = @venue_management.venue_management_invitings.to_a
%>
@ -336,6 +339,7 @@
<td><%= t("vm_inviting.enums.#{inviting.house_tax_payer}") + "/" + t("vm_inviting.enums.#{inviting.land_tax_payer}") %></td>
<td><%= inviting.contractor_manager %></td>
<td><%= t("vm_inviting.enums.bid_result.#{inviting.bid_result}") %></td>
<td><%= inviting.display_details %></td>
</tr>
<% end %>
</tbody>

View File

@ -59,7 +59,7 @@
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_inviting.details') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_inviting.details %></td>
<td class="venue_managementive-title-value"><%= @venue_management_inviting.details.to_s.html_safe %></td>
</tr>
<% if !@venue_management_inviting.venue_management_files.blank? %>
<tr>

View File

@ -18,7 +18,7 @@
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_memorabilia.details') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_memorabilia.details %></td>
<td class="venue_managementive-title-value"><%= @venue_management_memorabilia.details.to_s.html_safe %></td>
</tr>
<% if !@venue_management_memorabilia.venue_management_files.blank? %>
<tr>

View File

@ -280,6 +280,7 @@ en:
'false': 'No'
sign_date: Sign Date
handover_date: Handover Date
deposit_amount_type_exp_date: 'Deposit amount/Type/EXP Date'
deposit_amount: Deposit amount
deposit_payment_date: Deposit Payment Date
deposit_type: Deposit Type

View File

@ -33,8 +33,8 @@ zh_tw:
contractor: 廠商
land_number: 地號
area: 其他面積
land_area: 地面積
building_area: 建物面積
land_area: 地面積
building_area: 建物/營業面積
other_area: 其他面積
land_zoning: 土地使用分區
coordinator: 承辦人
@ -280,6 +280,7 @@ zh_tw:
'false':
sign_date: 簽約日期
handover_date: 點交日期
deposit_amount_type_exp_date: '履約保證金額/形式/效期'
deposit_amount: 履約保證金額
deposit_payment_date: 履約保證金繳交日期
deposit_type: 履約保證金繳交形式

View File

@ -27,7 +27,11 @@ Rails.application.routes.draw do
resources :venue_management_agreements
resources :venue_management_signups
resources :venue_management_item_contents
resources :venue_management_invitings
resources :venue_management_invitings do
collection do
get 'export'
end
end
resources :venue_management_memorabilias
resources :venue_management_bills do
collection do
@ -40,6 +44,7 @@ Rails.application.routes.draw do
resources :venue_management_contracts do
collection do
post 'fetch_inviting'
get 'export'
end
end
end