[add] Database and settings
This commit is contained in:
parent
b98b4077b4
commit
61eb809204
@ -46,6 +46,18 @@ return [
|
|||||||
'employee' => [
|
'employee' => [
|
||||||
'codeLength' => '3',
|
'codeLength' => '3',
|
||||||
'contractTypes' => array('INTERNO', 'EXTERNO'),
|
'contractTypes' => array('INTERNO', 'EXTERNO'),
|
||||||
|
'hoursPerWorkDay' => 8,
|
||||||
|
'paymentperHour' => 30,
|
||||||
|
'bonusPerDelivery' => 5,
|
||||||
|
'perHourBonusDriver' => 10,
|
||||||
|
'perHourBonusLoader' => 5,
|
||||||
|
'perHourBonusAux' => 0,
|
||||||
|
'BaseIsr' => 9,
|
||||||
|
'extraIsr' => 3,
|
||||||
|
'taxesAddUp' => true, // If true this will be total/(9 + 3) else they're subtracted separately
|
||||||
|
'amountForExtraTaxes' => 16000,
|
||||||
|
'vouchersForAllContractTypes' => false, // Outsourced personal won't get vouchers
|
||||||
|
'percentOfPaymentForVouchers' => 4,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -73,3 +73,21 @@ CREATE TABLE IF NOT EXISTS `employees` (
|
|||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE (`code`)
|
UNIQUE (`code`)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS paymentsPerEmployeePerDay;
|
||||||
|
CREATE TABLE IF NOT EXISTS `paymentsPerEmployeePerDay` (
|
||||||
|
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
`idEmployee` INT UNSIGNED NOT NULL comment 'The employee to who this payment will be made',
|
||||||
|
`date` DATE NOT NULL DEFAULT '1900-01-01' comment 'Date of the worked day',
|
||||||
|
`baseAmount` DOUBLE(10,2) NOT NULL DEFAULT 0.0 comment 'Amount paid for the hours worked',
|
||||||
|
`bonusTime` DOUBLE(10,2) NOT NULL DEFAULT 0.0 comment 'Bonus paid for the hours worked',
|
||||||
|
`deliveries` DOUBLE(10,2) NOT NULL DEFAULT 0.0 comment 'Bonus for the number of deliveries',
|
||||||
|
`taxes` DOUBLE(10,2) NOT NULL DEFAULT 0.0 comment 'Substracted amout for taxes',
|
||||||
|
`vouchers` DOUBLE(10,2) NOT NULL DEFAULT 0.0 comment 'Amout given in vouchers',
|
||||||
|
`status` ENUM('ACTIVE', 'INACTIVE') NOT NULL DEFAULT 'ACTIVE',
|
||||||
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP comment 'The date on which the registry was created',
|
||||||
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP comment 'The date of the last time the row was modified',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
FOREIGN KEY (idEmployee) REFERENCES employees(id),
|
||||||
|
UNIQUE (`idEmployee`, `date`)
|
||||||
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user