fee account
parent
d946f8a323
commit
2422c86019
|
|
@ -40,7 +40,26 @@ const createStatements = [
|
||||||
`create table if not exists LotOccupancyComments (lotOccupancyCommentId integer not null primary key autoincrement, lotOccupancyId integer not null, lotOccupancyCommentDate integer not null check (lotOccupancyCommentDate > 0), lotOccupancyCommentTime integer not null check (lotOccupancyCommentTime >= 0), lotOccupancyComment text not null, ${recordColumns}, foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId))`,
|
`create table if not exists LotOccupancyComments (lotOccupancyCommentId integer not null primary key autoincrement, lotOccupancyId integer not null, lotOccupancyCommentDate integer not null check (lotOccupancyCommentDate > 0), lotOccupancyCommentTime integer not null check (lotOccupancyCommentTime >= 0), lotOccupancyComment text not null, ${recordColumns}, foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId))`,
|
||||||
'create index if not exists idx_lotoccupancycomments_datetime on LotOccupancyComments (lotOccupancyId, lotOccupancyCommentDate, lotOccupancyCommentTime)',
|
'create index if not exists idx_lotoccupancycomments_datetime on LotOccupancyComments (lotOccupancyId, lotOccupancyCommentDate, lotOccupancyCommentTime)',
|
||||||
`create table if not exists FeeCategories (feeCategoryId integer not null primary key autoincrement, feeCategory varchar(100) not null, orderNumber smallint not null default 0, ${recordColumns})`,
|
`create table if not exists FeeCategories (feeCategoryId integer not null primary key autoincrement, feeCategory varchar(100) not null, orderNumber smallint not null default 0, ${recordColumns})`,
|
||||||
`create table if not exists Fees (feeId integer not null primary key autoincrement, feeCategoryId integer not null, feeName varchar(100) not null, feeDescription text, occupancyTypeId integer, lotTypeId integer, includeQuantity boolean not null default 0, quantityUnit varchar(30), feeAmount decimal(8, 2), feeFunction varchar(100), taxAmount decimal(6, 2), taxPercentage decimal(5, 2), isRequired bit not null default 0, orderNumber smallint not null default 0, ${recordColumns}, foreign key (feeCategoryId) references FeeCategories (feeCategoryId), foreign key (occupancyTypeId) references OccupancyTypes (occupancyTypeId), foreign key (lotTypeId) references LotTypes (lotTypeId))`,
|
`create table if not exists Fees (
|
||||||
|
feeId integer not null primary key autoincrement,
|
||||||
|
feeCategoryId integer not null,
|
||||||
|
feeName varchar(100) not null,
|
||||||
|
feeDescription text,
|
||||||
|
feeAccount varchar(20),
|
||||||
|
occupancyTypeId integer,
|
||||||
|
lotTypeId integer,
|
||||||
|
includeQuantity boolean not null default 0,
|
||||||
|
quantityUnit varchar(30),
|
||||||
|
feeAmount decimal(8, 2),
|
||||||
|
feeFunction varchar(100),
|
||||||
|
taxAmount decimal(6, 2),
|
||||||
|
taxPercentage decimal(5, 2),
|
||||||
|
isRequired bit not null default 0,
|
||||||
|
orderNumber smallint not null default 0,
|
||||||
|
${recordColumns},
|
||||||
|
foreign key (feeCategoryId) references FeeCategories (feeCategoryId),
|
||||||
|
foreign key (occupancyTypeId) references OccupancyTypes (occupancyTypeId),
|
||||||
|
foreign key (lotTypeId) references LotTypes (lotTypeId))`,
|
||||||
'create index if not exists idx_fees_ordernumber on Fees (orderNumber, feeName)',
|
'create index if not exists idx_fees_ordernumber on Fees (orderNumber, feeName)',
|
||||||
`create table if not exists LotOccupancyFees (lotOccupancyId integer not null, feeId integer not null, quantity decimal(4, 1) not null default 1, feeAmount decimal(8, 2) not null, taxAmount decmial(8, 2) not null, ${recordColumns}, primary key (lotOccupancyId, feeId), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId), foreign key (feeId) references Fees (feeId)) without rowid`,
|
`create table if not exists LotOccupancyFees (lotOccupancyId integer not null, feeId integer not null, quantity decimal(4, 1) not null default 1, feeAmount decimal(8, 2) not null, taxAmount decmial(8, 2) not null, ${recordColumns}, primary key (lotOccupancyId, feeId), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId), foreign key (feeId) references Fees (feeId)) without rowid`,
|
||||||
`create table if not exists LotOccupancyTransactions (lotOccupancyId integer not null, transactionIndex integer not null, transactionDate integer not null check (transactionDate > 0), transactionTime integer not null check (transactionTime >= 0), transactionAmount decimal(8, 2) not null, externalReceiptNumber varchar(100), transactionNote text, ${recordColumns}, primary key (lotOccupancyId, transactionIndex), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId)) without rowid`,
|
`create table if not exists LotOccupancyTransactions (lotOccupancyId integer not null, transactionIndex integer not null, transactionDate integer not null check (transactionDate > 0), transactionTime integer not null check (transactionTime >= 0), transactionAmount decimal(8, 2) not null, externalReceiptNumber varchar(100), transactionNote text, ${recordColumns}, primary key (lotOccupancyId, transactionIndex), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId)) without rowid`,
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,26 @@ const createStatements = [
|
||||||
|
|
||||||
// Fees and Transactions
|
// Fees and Transactions
|
||||||
`create table if not exists FeeCategories (feeCategoryId integer not null primary key autoincrement, feeCategory varchar(100) not null, orderNumber smallint not null default 0, ${recordColumns})`,
|
`create table if not exists FeeCategories (feeCategoryId integer not null primary key autoincrement, feeCategory varchar(100) not null, orderNumber smallint not null default 0, ${recordColumns})`,
|
||||||
`create table if not exists Fees (feeId integer not null primary key autoincrement, feeCategoryId integer not null, feeName varchar(100) not null, feeDescription text, occupancyTypeId integer, lotTypeId integer, includeQuantity boolean not null default 0, quantityUnit varchar(30), feeAmount decimal(8, 2), feeFunction varchar(100), taxAmount decimal(6, 2), taxPercentage decimal(5, 2), isRequired bit not null default 0, orderNumber smallint not null default 0, ${recordColumns}, foreign key (feeCategoryId) references FeeCategories (feeCategoryId), foreign key (occupancyTypeId) references OccupancyTypes (occupancyTypeId), foreign key (lotTypeId) references LotTypes (lotTypeId))`,
|
`create table if not exists Fees (
|
||||||
|
feeId integer not null primary key autoincrement,
|
||||||
|
feeCategoryId integer not null,
|
||||||
|
feeName varchar(100) not null,
|
||||||
|
feeDescription text,
|
||||||
|
feeAccount varchar(20),
|
||||||
|
occupancyTypeId integer,
|
||||||
|
lotTypeId integer,
|
||||||
|
includeQuantity boolean not null default 0,
|
||||||
|
quantityUnit varchar(30),
|
||||||
|
feeAmount decimal(8, 2),
|
||||||
|
feeFunction varchar(100),
|
||||||
|
taxAmount decimal(6, 2),
|
||||||
|
taxPercentage decimal(5, 2),
|
||||||
|
isRequired bit not null default 0,
|
||||||
|
orderNumber smallint not null default 0,
|
||||||
|
${recordColumns},
|
||||||
|
foreign key (feeCategoryId) references FeeCategories (feeCategoryId),
|
||||||
|
foreign key (occupancyTypeId) references OccupancyTypes (occupancyTypeId),
|
||||||
|
foreign key (lotTypeId) references LotTypes (lotTypeId))`,
|
||||||
'create index if not exists idx_fees_ordernumber on Fees (orderNumber, feeName)',
|
'create index if not exists idx_fees_ordernumber on Fees (orderNumber, feeName)',
|
||||||
`create table if not exists LotOccupancyFees (lotOccupancyId integer not null, feeId integer not null, quantity decimal(4, 1) not null default 1, feeAmount decimal(8, 2) not null, taxAmount decmial(8, 2) not null, ${recordColumns}, primary key (lotOccupancyId, feeId), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId), foreign key (feeId) references Fees (feeId)) without rowid`,
|
`create table if not exists LotOccupancyFees (lotOccupancyId integer not null, feeId integer not null, quantity decimal(4, 1) not null default 1, feeAmount decimal(8, 2) not null, taxAmount decmial(8, 2) not null, ${recordColumns}, primary key (lotOccupancyId, feeId), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId), foreign key (feeId) references Fees (feeId)) without rowid`,
|
||||||
`create table if not exists LotOccupancyTransactions (lotOccupancyId integer not null, transactionIndex integer not null, transactionDate integer not null check (transactionDate > 0), transactionTime integer not null check (transactionTime >= 0), transactionAmount decimal(8, 2) not null, externalReceiptNumber varchar(100), transactionNote text, ${recordColumns}, primary key (lotOccupancyId, transactionIndex), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId)) without rowid`,
|
`create table if not exists LotOccupancyTransactions (lotOccupancyId integer not null, transactionIndex integer not null, transactionDate integer not null check (transactionDate > 0), transactionTime integer not null check (transactionTime >= 0), transactionAmount decimal(8, 2) not null, externalReceiptNumber varchar(100), transactionNote text, ${recordColumns}, primary key (lotOccupancyId, transactionIndex), foreign key (lotOccupancyId) references LotOccupancies (lotOccupancyId)) without rowid`,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ interface AddFeeForm {
|
||||||
feeCategoryId: string;
|
feeCategoryId: string;
|
||||||
feeName: string;
|
feeName: string;
|
||||||
feeDescription: string;
|
feeDescription: string;
|
||||||
|
feeAccount: string;
|
||||||
occupancyTypeId: string;
|
occupancyTypeId: string;
|
||||||
lotTypeId: string;
|
lotTypeId: string;
|
||||||
feeAmount?: string;
|
feeAmount?: string;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ export async function addFee(feeForm, requestSession) {
|
||||||
const result = database
|
const result = database
|
||||||
.prepare(`insert into Fees (
|
.prepare(`insert into Fees (
|
||||||
feeCategoryId,
|
feeCategoryId,
|
||||||
feeName, feeDescription,
|
feeName, feeDescription, feeAccount,
|
||||||
occupancyTypeId, lotTypeId,
|
occupancyTypeId, lotTypeId,
|
||||||
feeAmount, feeFunction,
|
feeAmount, feeFunction,
|
||||||
taxAmount, taxPercentage,
|
taxAmount, taxPercentage,
|
||||||
|
|
@ -13,8 +13,8 @@ export async function addFee(feeForm, requestSession) {
|
||||||
isRequired, orderNumber,
|
isRequired, orderNumber,
|
||||||
recordCreate_userName, recordCreate_timeMillis,
|
recordCreate_userName, recordCreate_timeMillis,
|
||||||
recordUpdate_userName, recordUpdate_timeMillis)
|
recordUpdate_userName, recordUpdate_timeMillis)
|
||||||
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`)
|
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`)
|
||||||
.run(feeForm.feeCategoryId, feeForm.feeName, feeForm.feeDescription, feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId, feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId, feeForm.feeAmount ?? undefined, feeForm.feeFunction ?? undefined, feeForm.taxAmount ?? undefined, feeForm.taxPercentage ?? undefined, (feeForm.includeQuantity ?? '') === '' ? 0 : 1, feeForm.quantityUnit, (feeForm.isRequired ?? '') === '' ? 0 : 1, feeForm.orderNumber ?? -1, requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
.run(feeForm.feeCategoryId, feeForm.feeName, feeForm.feeDescription, feeForm.feeAccount, feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId, feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId, feeForm.feeAmount ?? undefined, feeForm.feeFunction ?? undefined, feeForm.taxAmount ?? undefined, feeForm.taxPercentage ?? undefined, (feeForm.includeQuantity ?? '') === '' ? 0 : 1, feeForm.quantityUnit, (feeForm.isRequired ?? '') === '' ? 0 : 1, feeForm.orderNumber ?? -1, requestSession.user.userName, rightNowMillis, requestSession.user.userName, rightNowMillis);
|
||||||
database.release();
|
database.release();
|
||||||
return result.lastInsertRowid;
|
return result.lastInsertRowid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ interface AddFeeForm {
|
||||||
feeCategoryId: string
|
feeCategoryId: string
|
||||||
feeName: string
|
feeName: string
|
||||||
feeDescription: string
|
feeDescription: string
|
||||||
|
feeAccount: string
|
||||||
occupancyTypeId: string
|
occupancyTypeId: string
|
||||||
lotTypeId: string
|
lotTypeId: string
|
||||||
feeAmount?: string
|
feeAmount?: string
|
||||||
|
|
@ -32,7 +33,7 @@ export async function addFee(
|
||||||
.prepare(
|
.prepare(
|
||||||
`insert into Fees (
|
`insert into Fees (
|
||||||
feeCategoryId,
|
feeCategoryId,
|
||||||
feeName, feeDescription,
|
feeName, feeDescription, feeAccount,
|
||||||
occupancyTypeId, lotTypeId,
|
occupancyTypeId, lotTypeId,
|
||||||
feeAmount, feeFunction,
|
feeAmount, feeFunction,
|
||||||
taxAmount, taxPercentage,
|
taxAmount, taxPercentage,
|
||||||
|
|
@ -40,12 +41,13 @@ export async function addFee(
|
||||||
isRequired, orderNumber,
|
isRequired, orderNumber,
|
||||||
recordCreate_userName, recordCreate_timeMillis,
|
recordCreate_userName, recordCreate_timeMillis,
|
||||||
recordUpdate_userName, recordUpdate_timeMillis)
|
recordUpdate_userName, recordUpdate_timeMillis)
|
||||||
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
||||||
)
|
)
|
||||||
.run(
|
.run(
|
||||||
feeForm.feeCategoryId,
|
feeForm.feeCategoryId,
|
||||||
feeForm.feeName,
|
feeForm.feeName,
|
||||||
feeForm.feeDescription,
|
feeForm.feeDescription,
|
||||||
|
feeForm.feeAccount,
|
||||||
feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId,
|
feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId,
|
||||||
feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId,
|
feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId,
|
||||||
feeForm.feeAmount ?? undefined,
|
feeForm.feeAmount ?? undefined,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ export async function getFee(feeId, connectedDatabase) {
|
||||||
const fee = database
|
const fee = database
|
||||||
.prepare(`select f.feeId,
|
.prepare(`select f.feeId,
|
||||||
f.feeCategoryId, c.feeCategory,
|
f.feeCategoryId, c.feeCategory,
|
||||||
f.feeName, f.feeDescription,
|
f.feeName, f.feeDescription, f.feeAccount,
|
||||||
f.occupancyTypeId, o.occupancyType,
|
f.occupancyTypeId, o.occupancyType,
|
||||||
f.lotTypeId, l.lotType,
|
f.lotTypeId, l.lotType,
|
||||||
ifnull(f.feeAmount, 0) as feeAmount, f.feeFunction,
|
ifnull(f.feeAmount, 0) as feeAmount, f.feeFunction,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ export async function getFee(
|
||||||
.prepare(
|
.prepare(
|
||||||
`select f.feeId,
|
`select f.feeId,
|
||||||
f.feeCategoryId, c.feeCategory,
|
f.feeCategoryId, c.feeCategory,
|
||||||
f.feeName, f.feeDescription,
|
f.feeName, f.feeDescription, f.feeAccount,
|
||||||
f.occupancyTypeId, o.occupancyType,
|
f.occupancyTypeId, o.occupancyType,
|
||||||
f.lotTypeId, l.lotType,
|
f.lotTypeId, l.lotType,
|
||||||
ifnull(f.feeAmount, 0) as feeAmount, f.feeFunction,
|
ifnull(f.feeAmount, 0) as feeAmount, f.feeFunction,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,8 @@ export async function getFees(feeCategoryId, additionalFilters, connectedDatabas
|
||||||
sqlParameters.push(additionalFilters.lotTypeId);
|
sqlParameters.push(additionalFilters.lotTypeId);
|
||||||
}
|
}
|
||||||
const fees = database
|
const fees = database
|
||||||
.prepare(`select f.feeId, f.feeName, f.feeDescription,
|
.prepare(`select f.feeId,
|
||||||
|
f.feeName, f.feeDescription, f.feeAccount,
|
||||||
f.occupancyTypeId, o.occupancyType,
|
f.occupancyTypeId, o.occupancyType,
|
||||||
f.lotTypeId, l.lotType,
|
f.lotTypeId, l.lotType,
|
||||||
ifnull(f.feeAmount, 0) as feeAmount,
|
ifnull(f.feeAmount, 0) as feeAmount,
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,8 @@ export async function getFees(
|
||||||
|
|
||||||
const fees = database
|
const fees = database
|
||||||
.prepare(
|
.prepare(
|
||||||
`select f.feeId, f.feeName, f.feeDescription,
|
`select f.feeId,
|
||||||
|
f.feeName, f.feeDescription, f.feeAccount,
|
||||||
f.occupancyTypeId, o.occupancyType,
|
f.occupancyTypeId, o.occupancyType,
|
||||||
f.lotTypeId, l.lotType,
|
f.lotTypeId, l.lotType,
|
||||||
ifnull(f.feeAmount, 0) as feeAmount,
|
ifnull(f.feeAmount, 0) as feeAmount,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ interface UpdateFeeForm {
|
||||||
feeCategoryId: string;
|
feeCategoryId: string;
|
||||||
feeName: string;
|
feeName: string;
|
||||||
feeDescription: string;
|
feeDescription: string;
|
||||||
|
feeAccount: string;
|
||||||
occupancyTypeId: string;
|
occupancyTypeId: string;
|
||||||
lotTypeId: string;
|
lotTypeId: string;
|
||||||
feeAmount?: string;
|
feeAmount?: string;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ export async function updateFee(feeForm, requestSession) {
|
||||||
set feeCategoryId = ?,
|
set feeCategoryId = ?,
|
||||||
feeName = ?,
|
feeName = ?,
|
||||||
feeDescription = ?,
|
feeDescription = ?,
|
||||||
|
feeAccount = ?,
|
||||||
occupancyTypeId = ?,
|
occupancyTypeId = ?,
|
||||||
lotTypeId = ?,
|
lotTypeId = ?,
|
||||||
feeAmount = ?,
|
feeAmount = ?,
|
||||||
|
|
@ -19,7 +20,7 @@ export async function updateFee(feeForm, requestSession) {
|
||||||
recordUpdate_timeMillis = ?
|
recordUpdate_timeMillis = ?
|
||||||
where recordDelete_timeMillis is null
|
where recordDelete_timeMillis is null
|
||||||
and feeId = ?`)
|
and feeId = ?`)
|
||||||
.run(feeForm.feeCategoryId, feeForm.feeName, feeForm.feeDescription, feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId, feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId, feeForm.feeAmount === undefined || feeForm.feeAmount === ''
|
.run(feeForm.feeCategoryId, feeForm.feeName, feeForm.feeDescription, feeForm.feeAccount, feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId, feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId, feeForm.feeAmount === undefined || feeForm.feeAmount === ''
|
||||||
? 0
|
? 0
|
||||||
: feeForm.feeAmount, feeForm.feeFunction ?? undefined, feeForm.taxAmount ?? undefined, feeForm.taxPercentage ?? undefined, feeForm.includeQuantity === '' ? 0 : 1, feeForm.quantityUnit, feeForm.isRequired === '' ? 0 : 1, requestSession.user.userName, Date.now(), feeForm.feeId);
|
: feeForm.feeAmount, feeForm.feeFunction ?? undefined, feeForm.taxAmount ?? undefined, feeForm.taxPercentage ?? undefined, feeForm.includeQuantity === '' ? 0 : 1, feeForm.quantityUnit, feeForm.isRequired === '' ? 0 : 1, requestSession.user.userName, Date.now(), feeForm.feeId);
|
||||||
database.release();
|
database.release();
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ interface UpdateFeeForm {
|
||||||
feeCategoryId: string
|
feeCategoryId: string
|
||||||
feeName: string
|
feeName: string
|
||||||
feeDescription: string
|
feeDescription: string
|
||||||
|
feeAccount: string
|
||||||
occupancyTypeId: string
|
occupancyTypeId: string
|
||||||
lotTypeId: string
|
lotTypeId: string
|
||||||
feeAmount?: string
|
feeAmount?: string
|
||||||
|
|
@ -30,6 +31,7 @@ export async function updateFee(
|
||||||
set feeCategoryId = ?,
|
set feeCategoryId = ?,
|
||||||
feeName = ?,
|
feeName = ?,
|
||||||
feeDescription = ?,
|
feeDescription = ?,
|
||||||
|
feeAccount = ?,
|
||||||
occupancyTypeId = ?,
|
occupancyTypeId = ?,
|
||||||
lotTypeId = ?,
|
lotTypeId = ?,
|
||||||
feeAmount = ?,
|
feeAmount = ?,
|
||||||
|
|
@ -48,6 +50,7 @@ export async function updateFee(
|
||||||
feeForm.feeCategoryId,
|
feeForm.feeCategoryId,
|
||||||
feeForm.feeName,
|
feeForm.feeName,
|
||||||
feeForm.feeDescription,
|
feeForm.feeDescription,
|
||||||
|
feeForm.feeAccount,
|
||||||
feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId,
|
feeForm.occupancyTypeId === '' ? undefined : feeForm.occupancyTypeId,
|
||||||
feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId,
|
feeForm.lotTypeId === '' ? undefined : feeForm.lotTypeId,
|
||||||
feeForm.feeAmount === undefined || feeForm.feeAmount === ''
|
feeForm.feeAmount === undefined || feeForm.feeAmount === ''
|
||||||
|
|
|
||||||
|
|
@ -515,7 +515,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
}
|
}
|
||||||
cityssm.openHtmlModal('adminFees-editFee', {
|
cityssm.openHtmlModal('adminFees-editFee', {
|
||||||
onshow(modalElement) {
|
onshow(modalElement) {
|
||||||
var _a, _b, _c;
|
var _a, _b, _c, _d, _e, _f;
|
||||||
editModalElement = modalElement;
|
editModalElement = modalElement;
|
||||||
modalElement.querySelector('#feeEdit--feeId').value = fee.feeId.toString();
|
modalElement.querySelector('#feeEdit--feeId').value = fee.feeId.toString();
|
||||||
const feeCategoryElement = modalElement.querySelector('#feeEdit--feeCategoryId');
|
const feeCategoryElement = modalElement.querySelector('#feeEdit--feeCategoryId');
|
||||||
|
|
@ -529,8 +529,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
feeCategoryElement.append(optionElement);
|
feeCategoryElement.append(optionElement);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
modalElement.querySelector('#feeEdit--feeName').value = fee.feeName;
|
modalElement.querySelector('#feeEdit--feeName').value = (_a = fee.feeName) !== null && _a !== void 0 ? _a : '';
|
||||||
modalElement.querySelector('#feeEdit--feeDescription').value = fee.feeDescription;
|
modalElement.querySelector('#feeEdit--feeAccount').value = (_b = fee.feeAccount) !== null && _b !== void 0 ? _b : '';
|
||||||
|
modalElement.querySelector('#feeEdit--feeDescription').value = (_c = fee.feeDescription) !== null && _c !== void 0 ? _c : '';
|
||||||
const occupancyTypeElement = modalElement.querySelector('#feeEdit--occupancyTypeId');
|
const occupancyTypeElement = modalElement.querySelector('#feeEdit--occupancyTypeId');
|
||||||
for (const occupancyType of exports.occupancyTypes) {
|
for (const occupancyType of exports.occupancyTypes) {
|
||||||
const optionElement = document.createElement('option');
|
const optionElement = document.createElement('option');
|
||||||
|
|
@ -565,13 +566,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
taxPercentageElement.addEventListener('keyup', toggleTaxFields);
|
taxPercentageElement.addEventListener('keyup', toggleTaxFields);
|
||||||
toggleTaxFields();
|
toggleTaxFields();
|
||||||
const includeQuantityElement = modalElement.querySelector('#feeEdit--includeQuantity');
|
const includeQuantityElement = modalElement.querySelector('#feeEdit--includeQuantity');
|
||||||
if ((_a = fee.includeQuantity) !== null && _a !== void 0 ? _a : false) {
|
if ((_d = fee.includeQuantity) !== null && _d !== void 0 ? _d : false) {
|
||||||
includeQuantityElement.value = '1';
|
includeQuantityElement.value = '1';
|
||||||
}
|
}
|
||||||
includeQuantityElement.addEventListener('change', toggleQuantityFields);
|
includeQuantityElement.addEventListener('change', toggleQuantityFields);
|
||||||
modalElement.querySelector('#feeEdit--quantityUnit').value = (_b = fee.quantityUnit) !== null && _b !== void 0 ? _b : '';
|
modalElement.querySelector('#feeEdit--quantityUnit').value = (_e = fee.quantityUnit) !== null && _e !== void 0 ? _e : '';
|
||||||
toggleQuantityFields();
|
toggleQuantityFields();
|
||||||
if ((_c = fee.isRequired) !== null && _c !== void 0 ? _c : false) {
|
if ((_f = fee.isRequired) !== null && _f !== void 0 ? _f : false) {
|
||||||
;
|
;
|
||||||
modalElement.querySelector('#feeEdit--isRequired').value = '1';
|
modalElement.querySelector('#feeEdit--isRequired').value = '1';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -781,12 +781,15 @@ declare const bulmaJS: BulmaJS
|
||||||
|
|
||||||
;(
|
;(
|
||||||
modalElement.querySelector('#feeEdit--feeName') as HTMLInputElement
|
modalElement.querySelector('#feeEdit--feeName') as HTMLInputElement
|
||||||
).value = fee.feeName!
|
).value = fee.feeName ?? ''
|
||||||
|
;(
|
||||||
|
modalElement.querySelector('#feeEdit--feeAccount') as HTMLInputElement
|
||||||
|
).value = fee.feeAccount ?? ''
|
||||||
;(
|
;(
|
||||||
modalElement.querySelector(
|
modalElement.querySelector(
|
||||||
'#feeEdit--feeDescription'
|
'#feeEdit--feeDescription'
|
||||||
) as HTMLTextAreaElement
|
) as HTMLTextAreaElement
|
||||||
).value = fee.feeDescription!
|
).value = fee.feeDescription ?? ''
|
||||||
|
|
||||||
const occupancyTypeElement = modalElement.querySelector(
|
const occupancyTypeElement = modalElement.querySelector(
|
||||||
'#feeEdit--occupancyTypeId'
|
'#feeEdit--occupancyTypeId'
|
||||||
|
|
|
||||||
|
|
@ -23,17 +23,34 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="columns">
|
||||||
<label class="label" for="feeAdd--feeName">Fee Name</label>
|
<div class="column">
|
||||||
<div class="control">
|
<div class="field">
|
||||||
<input
|
<label class="label" for="feeAdd--feeName">Fee Name</label>
|
||||||
class="input"
|
<div class="control">
|
||||||
id="feeAdd--feeName"
|
<input
|
||||||
name="feeName"
|
class="input"
|
||||||
maxlength="100"
|
id="feeAdd--feeName"
|
||||||
autocomplete="off"
|
name="feeName"
|
||||||
required
|
maxlength="100"
|
||||||
/>
|
autocomplete="off"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="feeAdd--feeAccount">Fee Account</label>
|
||||||
|
<div class="control">
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
id="feeAdd--feeAccount"
|
||||||
|
name="feeAccount"
|
||||||
|
maxlength="20"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
||||||
|
|
@ -24,17 +24,34 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="columns">
|
||||||
<label class="label" for="feeEdit--feeName">Fee Name</label>
|
<div class="column">
|
||||||
<div class="control">
|
<div class="field">
|
||||||
<input
|
<label class="label" for="feeEdit--feeName">Fee Name</label>
|
||||||
class="input"
|
<div class="control">
|
||||||
id="feeEdit--feeName"
|
<input
|
||||||
name="feeName"
|
class="input"
|
||||||
maxlength="100"
|
id="feeEdit--feeName"
|
||||||
autocomplete="off"
|
name="feeName"
|
||||||
required
|
maxlength="100"
|
||||||
/>
|
autocomplete="off"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column">
|
||||||
|
<div class="field">
|
||||||
|
<label class="label" for="feeEdit--feeAccount">Fee Account</label>
|
||||||
|
<div class="control">
|
||||||
|
<input
|
||||||
|
class="input"
|
||||||
|
id="feeEdit--feeAccount"
|
||||||
|
name="feeAccount"
|
||||||
|
maxlength="20"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -118,6 +118,7 @@ export interface Fee extends Record {
|
||||||
feeCategory?: string;
|
feeCategory?: string;
|
||||||
feeName?: string;
|
feeName?: string;
|
||||||
feeDescription?: string;
|
feeDescription?: string;
|
||||||
|
feeAccount?: string;
|
||||||
occupancyTypeId?: number;
|
occupancyTypeId?: number;
|
||||||
occupancyType?: string;
|
occupancyType?: string;
|
||||||
lotTypeId?: number;
|
lotTypeId?: number;
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@ export interface Fee extends Record {
|
||||||
|
|
||||||
feeName?: string
|
feeName?: string
|
||||||
feeDescription?: string
|
feeDescription?: string
|
||||||
|
feeAccount?: string
|
||||||
|
|
||||||
occupancyTypeId?: number
|
occupancyTypeId?: number
|
||||||
occupancyType?: string
|
occupancyType?: string
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue