Allow customising ticketing fee name
This commit is contained in:
parent
d967a548a4
commit
ec370b47cd
@ -39,6 +39,7 @@ AVAILABLE_APPROVERS = [
|
||||
]
|
||||
BUDGET_ENABLE_VOTING = True
|
||||
|
||||
TICKETING_FEE_NAME = 'Fee'
|
||||
TICKETING_FEE_PROPORTION = 0.0175 # Previous default was (1-1/1.01884)
|
||||
TICKETING_FEE_FIXED = 0.30 # Previous default was 0.8133/1.01884
|
||||
|
||||
|
@ -255,6 +255,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
const ticketingFeeName = JSON.parse({{ import('json').dumps(import('json').dumps(settings.TICKETING_FEE_NAME))|safe }});
|
||||
const ticketingFeeProportion = {{ settings.TICKETING_FEE_PROPORTION }};
|
||||
const ticketingFeeFixed = {{ settings.TICKETING_FEE_FIXED }};
|
||||
const editing = true;
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
{#
|
||||
Society Self-Service
|
||||
Copyright © 2018–2020 Yingtong Li (RunasSudo)
|
||||
Copyright © 2018-2023 Yingtong Li (RunasSudo)
|
||||
Copyright © 2023 MUMUS Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
@ -156,9 +157,13 @@
|
||||
<script src="{{ static('sstreasury/budget.js') }}"></script>
|
||||
|
||||
<script>
|
||||
const ticketingFeeName = JSON.parse({{ import('json').dumps(import('json').dumps(settings.TICKETING_FEE_NAME))|safe }});
|
||||
const ticketingFeeProportion = {{ settings.TICKETING_FEE_PROPORTION }};
|
||||
const ticketingFeeFixed = {{ settings.TICKETING_FEE_FIXED }};
|
||||
const editing = false;
|
||||
|
||||
var revenue_data = JSON.parse({{ import('json').dumps(import('json').dumps(revision.revenue))|safe }});
|
||||
var expense_data = JSON.parse({{ import('json').dumps(import('json').dumps(revision.expense))|safe }});
|
||||
var editing = false;
|
||||
makeGrid();
|
||||
|
||||
print();
|
||||
|
@ -502,6 +502,7 @@
|
||||
<script src="{{ static('sstreasury/budget.js') }}"></script>
|
||||
|
||||
<script>
|
||||
const ticketingFeeName = JSON.parse({{ import('json').dumps(import('json').dumps(settings.TICKETING_FEE_NAME))|safe }});
|
||||
const ticketingFeeProportion = {{ revision.ticketing_fee_proportion }};
|
||||
const ticketingFeeFixed = {{ revision.ticketing_fee_fixed }};
|
||||
const editing = false;
|
||||
|
@ -107,7 +107,7 @@ function makeGrid() {
|
||||
{ name: 'Description', type: 'text', width: '50%', validate: 'required' },
|
||||
{ name: 'Unit price', type: 'float', width: '12.5%', validate: 'required', itemTemplate: function(value, item) { return '$' + value.toFixed(2); } },
|
||||
{ name: 'Units', type: 'float', width: '12.5%', validate: 'required' },
|
||||
{ name: 'IWT', type: 'checkbox', width: '5%', insertTemplate: function() { var result = jsGrid.fields.checkbox.prototype.insertTemplate.call(this); result.prop('checked', true); return result; } },
|
||||
{ name: 'IWT', title: ticketingFeeName, type: 'checkbox', width: '5%', insertTemplate: function() { var result = jsGrid.fields.checkbox.prototype.insertTemplate.call(this); result.prop('checked', true); return result; } },
|
||||
{ name: 'Total', align: 'right', width: '10%', itemTemplate: function(value, item) { return '$' + (item['Unit price'] * item['Units']).toFixed(2); } },
|
||||
];
|
||||
if (editing) {
|
||||
|
Loading…
Reference in New Issue
Block a user