forked from Wavyzz/dolibarr
Merge branch '12.0_new_payments_on_salaries' of github.com:atm-gauthier/dolibarr into NEW/add_real_payments_on_salaries
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@@ -18,11 +17,10 @@
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_salary ADD INDEX idx_salary_ref (num_payment);
|
||||
ALTER TABLE llx_salary ADD INDEX idx_salary_user (fk_user, entity);
|
||||
ALTER TABLE llx_salary ADD INDEX idx_salary_datep (datep);
|
||||
ALTER TABLE llx_salary ADD INDEX idx_salary_datesp (datesp);
|
||||
ALTER TABLE llx_salary ADD INDEX idx_salary_dateep (dateep);
|
||||
|
||||
ALTER TABLE llx_salary ADD CONSTRAINT fk_salary_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_payment_salary ADD INDEX idx_payment_salary_ref (num_payment);
|
||||
ALTER TABLE llx_payment_salary ADD INDEX idx_payment_salary_user (fk_user, entity);
|
||||
ALTER TABLE llx_payment_salary ADD INDEX idx_payment_salary_datep (datep);
|
||||
ALTER TABLE llx_payment_salary ADD INDEX idx_payment_salary_datesp (datesp);
|
||||
ALTER TABLE llx_payment_salary ADD INDEX idx_payment_salary_dateep (dateep);
|
||||
|
||||
ALTER TABLE llx_payment_salary ADD CONSTRAINT fk_payment_salary_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid);
|
||||
@@ -1,6 +1,5 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
-- Copyright (C) 2011-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@@ -20,16 +19,24 @@
|
||||
create table llx_payment_salary
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_salary integer,
|
||||
datec datetime, -- date de creation
|
||||
tms timestamp,
|
||||
datep datetime, -- payment date
|
||||
amount double(24,8) DEFAULT 0,
|
||||
fk_typepaiement integer NOT NULL,
|
||||
num_paiement varchar(50),
|
||||
ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet)
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
datec datetime, -- Create date
|
||||
fk_user integer DEFAULT NULL,
|
||||
datep date, -- payment date
|
||||
datev date, -- value date (this field should not be here, only into bank tables)
|
||||
salary double(24,8), -- salary of user when payment was done
|
||||
amount double(24,8) NOT NULL DEFAULT 0,
|
||||
fk_projet integer DEFAULT NULL,
|
||||
fk_typepayment integer NOT NULL,
|
||||
num_payment varchar(50), -- num cheque or other
|
||||
label varchar(255),
|
||||
datesp date, -- date start period
|
||||
dateep date, -- date end period
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
note text,
|
||||
fk_bank integer NOT NULL,
|
||||
fk_user_creat integer, -- creation user
|
||||
fk_user_modif integer -- last modification user
|
||||
|
||||
fk_bank integer,
|
||||
fk_user_author integer, -- user creating
|
||||
fk_user_modif integer, -- user making last change
|
||||
fk_salary integer
|
||||
)ENGINE=innodb;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
-- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@@ -18,4 +17,4 @@
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
|
||||
ALTER TABLE llx_payment_salary_extrafields ADD INDEX idx_payment_salary_extrafields (fk_object);
|
||||
@@ -1,6 +1,5 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
-- Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@@ -17,7 +16,7 @@
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_salary_extrafields
|
||||
create table llx_payment_salary_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
Reference in New Issue
Block a user