cityssm/general-licence-manager

[FEATURE REQUEST] Additional licence fees

dangowans opened this issue · 3 comments

What feature are you suggesting?

I noticed that under the fee, we need to add a category for re-inspection. This is only for certain licences.

A re-inspection fee is at the discretion of the by-law officer or police officer. We would charge that in addition to the renewal fee.

Is your feature request related to a problem?

No.

Are there any workarounds? Are there any alternative solutions that would work?

Any amount can be added to the transaction log, including a re-inspection fee. There are notes available as well to further specify the nature of the transaction.

Are there any other helpful details?

Additional fees will affect determining the outstanding balance on a licence,

If fees can be flat rate or percentage, this could address #71 as well.

SQL to update current beta databases.

create table LicenceCategoryAdditionalFees (
	licenceAdditionalFeeKey varchar(80) not null primary key,
	licenceCategoryKey varchar(50) not null,
	additionalFee varchar(100) not null,
	additionalFeeType varchar(10) not null,
	additionalFeeNumber decimal(10, 2) not null default 0,
	additionalFeeFunction varchar(50) not null default '',
	isRequired bit not null default 0,
	orderNumber smallint not null default 0,
	recordCreate_userName varchar(30) not null,
	recordCreate_timeMillis integer not null,
	recordUpdate_userName varchar(30) not null,
	recordUpdate_timeMillis integer not null,
	recordDelete_userName varchar(30),
	recordDelete_timeMillis integer,
	foreign key (licenceCategoryKey) references LicenceCategories (licenceCategoryKey)
) without rowid

create table LicenceAdditionalFees (
	licenceId integer not null,
	licenceAdditionalFeeKey varchar(80) not null,
	additionalFeeAmount decimal(10, 2) not null default 0,
	primary key (licenceId, licenceAdditionalFeeKey),
	foreign key (licenceId) references Licences (licenceId)
) without rowid

alter table Licences
add baseLicenceFee decimal(10, 2) not null default 0

update Licences
set baseLicenceFee = licenceFee

alter table Licences
add baseReplacementFee decimal(10, 2) not null default 0

update Licences
set baseReplacementFee = replacementFee

In testing now.