This commit is contained in:
Alexandre SPANGARO 2022-06-20 03:56:09 +02:00
parent e792b07154
commit 295bda4806

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2011-2019 Alexandre Spangaro <aspangaro@open-dsi.fr> /* Copyright (C) 2011-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* *
@ -94,6 +94,10 @@ class Salary extends CommonObject
*/ */
public $user; public $user;
/**
* 1 if salary paid COMPLETELY, 0 otherwise (do not use it anymore, use statut and close_code)
*/
public $paye;
const STATUS_UNPAID = 0; const STATUS_UNPAID = 0;
const STATUS_PAID = 1; const STATUS_PAID = 1;
@ -218,8 +222,6 @@ class Salary extends CommonObject
$sql .= " s.fk_user_author,"; $sql .= " s.fk_user_author,";
$sql .= " s.fk_user_modif,"; $sql .= " s.fk_user_modif,";
$sql .= " s.fk_account"; $sql .= " s.fk_account";
/*$sql .= " b.fk_type,";
$sql .= " b.rappro";*/
$sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; $sql .= " FROM ".MAIN_DB_PREFIX."salary as s";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON s.fk_bank = b.rowid";
@ -249,10 +251,8 @@ class Salary extends CommonObject
$this->fk_user_author = $obj->fk_user_author; $this->fk_user_author = $obj->fk_user_author;
$this->fk_user_modif = $obj->fk_user_modif; $this->fk_user_modif = $obj->fk_user_modif;
$this->fk_account = $this->accountid = $obj->fk_account; $this->fk_account = $this->accountid = $obj->fk_account;
$this->fk_type = $obj->fk_type;
$this->rappro = $obj->rappro;
// Retreive all extrafield // Retrieve all extrafield
// fetch optionals attributes and labels // fetch optionals attributes and labels
$this->fetch_optionals(); $this->fetch_optionals();
} }