Fix date timezone
This commit is contained in:
parent
400a168687
commit
3cf90352bf
@ -266,6 +266,7 @@ class PaymentSalary extends CommonObject
|
|||||||
$this->num_paiement = $obj->num_payment;
|
$this->num_paiement = $obj->num_payment;
|
||||||
$this->num_payment = $obj->num_payment;
|
$this->num_payment = $obj->num_payment;
|
||||||
$this->note = $obj->note;
|
$this->note = $obj->note;
|
||||||
|
$this->note_private = $obj->note;
|
||||||
$this->fk_bank = $obj->fk_bank;
|
$this->fk_bank = $obj->fk_bank;
|
||||||
$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;
|
||||||
|
|||||||
@ -43,6 +43,8 @@ $action = GETPOST('action', 'aZ09');
|
|||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm');
|
||||||
if ($user->socid) $socid = $user->socid;
|
if ($user->socid) $socid = $user->socid;
|
||||||
|
|
||||||
|
$salary = new Salary($db);
|
||||||
|
|
||||||
$object = new PaymentSalary($db);
|
$object = new PaymentSalary($db);
|
||||||
if ($id > 0) {
|
if ($id > 0) {
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
@ -71,7 +73,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('salarie
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'setdatep' && GETPOST('datepday') && $user->hasRight('salaries', 'write')) {
|
if ($action == 'setdatep' && GETPOST('datepday') && $user->hasRight('salaries', 'write')) {
|
||||||
$datepaye = dol_mktime(GETPOST('datephour', 'int'), GETPOST('datepmin', 'int'), GETPOST('datepsec', 'int'), GETPOST('datepmonth', 'int'), GETPOST('datepday', 'int'), GETPOST('datepyear', 'int'), 'tzuserrel');
|
$datepaye = dol_mktime(GETPOST('datephour', 'int'), GETPOST('datepmin', 'int'), GETPOST('datepsec', 'int'), GETPOST('datepmonth', 'int'), GETPOST('datepday', 'int'), GETPOST('datepyear', 'int')); // field is a date in database, not a datetime, so we must use 'gmt' not 'tzuserrel'
|
||||||
$res = $object->updatePaymentDate($datepaye);
|
$res = $object->updatePaymentDate($datepaye);
|
||||||
if ($res === 0) {
|
if ($res === 0) {
|
||||||
setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs');
|
setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs');
|
||||||
@ -85,12 +87,10 @@ if ($action == 'setdatep' && GETPOST('datepday') && $user->hasRight('salaries',
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
$salary = new Salary($db);
|
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
|
llxHeader('', $langs->trans("SalaryPayment"));
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
|
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user