Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
17cf416489
34 changed files with 232 additions and 173 deletions
|
|
@ -8,8 +8,8 @@
|
|||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -1962,7 +1962,7 @@ if ($id > 0 && $action != 'create') {
|
|||
$object->datep = $datep;
|
||||
$object->datef = $datef;
|
||||
$object->percentage = $percentage;
|
||||
$object->priority = GETPOST("priority", "alphanohtml");
|
||||
$object->priority = GETPOSTINT("priority");
|
||||
$object->fulldayevent = GETPOST("fullday") ? 1 : 0;
|
||||
$object->location = GETPOST('location', "alphanohtml");
|
||||
$object->socid = GETPOSTINT("socid");
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -38,13 +38,18 @@ global $user;
|
|||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/**
|
||||
* @var Translate $langs
|
||||
* @var CommonObject $object
|
||||
*/
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("propal");
|
||||
|
||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
|
||||
'@phan-var-force Propal[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
|
||||
/** @var Propal[] $linkedObjectBlock */
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
|
|
@ -63,7 +68,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||
}
|
||||
print '</td>';
|
||||
print '<td class="linkedcol-name tdoverflowmax150">'.$objectlink->getNomUrl(1).'</td>';
|
||||
print '<td class="linkedcol-ref" >'.$objectlink->ref_client.'</td>';
|
||||
print '<td class="linkedcol-ref" >'.$objectlink->ref_customer.'</td>';
|
||||
print '<td class="linkedcol-date center">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||
print '<td class="linkedcol-amount right">';
|
||||
if ($user->hasRight('propal', 'lire')) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,10 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/** @var Translate $langs */
|
||||
/**
|
||||
* @var Translate $langs
|
||||
* @var CommonObject $object
|
||||
*/
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
/** @var Commande[] $linkedObjectBlock */
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -31,11 +32,14 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
|
||||
global $linkedObjectBlock;
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||
'@phan-var-force Facture[] $linkedObjectBlock';
|
||||
/** @var Facture[] $linkedObjectBlock */
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ if (empty($reshook)) {
|
|||
$object->phone_perso = (string) GETPOST("phone_perso", 'alpha');
|
||||
$object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha');
|
||||
$object->fax = (string) GETPOST("fax", 'alpha');
|
||||
$object->priv = (string) GETPOSTINT("priv");
|
||||
$object->priv = GETPOSTINT("priv");
|
||||
$object->note_public = (string) GETPOST("note_public", 'restricthtml');
|
||||
$object->note_private = (string) GETPOST("note_private", 'restricthtml');
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -33,7 +34,8 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock';
|
||||
'@phan-var-force Contrat[] $linkedObjectBlock';
|
||||
/** @var Contrat[] $linkedObjectBlock */
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("contracts");
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
* @var Conf $conf
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
* @var CommonObject $object
|
||||
* @var CommonObject|Societe $object
|
||||
*
|
||||
* @var string $action
|
||||
* @var int $id
|
||||
|
|
@ -50,6 +50,7 @@
|
|||
*/
|
||||
'
|
||||
@phan-var-force ?array<string,mixed> $moreparams
|
||||
@phan-var-force CommonObject|Societe $object
|
||||
';
|
||||
|
||||
if (!empty($permissioncreate) && empty($permissiontoadd)) {
|
||||
|
|
@ -87,7 +88,7 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc)))
|
|||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($object->thirdparty->default_lang)) {
|
||||
$newlang = $object->thirdparty->default_lang; // for proposal, order, invoice, ...
|
||||
}
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($object->default_lang)) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && property_exists($object, 'default_lang') && empty($newlang) && isset($object->default_lang)) {
|
||||
$newlang = $object->default_lang; // for thirdparty
|
||||
}
|
||||
if (!empty($newlang)) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2014-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -27,10 +27,18 @@
|
|||
// $object must be defined (object is loaded in this file with fetch)
|
||||
// $cancel must be defined
|
||||
// $id or $ref must be defined (object is loaded in this file with fetch)
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var string $action
|
||||
* @var string $cancel
|
||||
* @var string $ref
|
||||
*/
|
||||
|
||||
if (((!empty($id) && $id > 0) || (!empty($ref) && !in_array($action, array('create', 'createtask', 'add')))) && (empty($cancel) || $id > 0)) {
|
||||
if (($id > 0 && is_numeric($id)) || !empty($ref)) { // To discard case when id is list of ids like '1,2,3...'
|
||||
if ($object->element == 'usergroup') {
|
||||
/** @var UserGroup $object */
|
||||
'@phan-var-force UserGroup $object';
|
||||
$ret = $object->fetch($id, (empty($ref) ? '' : $ref), true); // to load $object->members
|
||||
} else {
|
||||
$ret = $object->fetch($id, (empty($ref) ? '' : $ref));
|
||||
|
|
|
|||
|
|
@ -2687,7 +2687,7 @@ class ExtraFields
|
|||
* @param int $todefaultifmissing 1=Set value to the default value in database if value is mandatory and missing
|
||||
* @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example)
|
||||
*/
|
||||
public function setOptionalsFromPost($extralabels, &$object, $onlykey = '', $todefaultifmissing = 0)
|
||||
public function setOptionalsFromPost($extralabels, $object, $onlykey = '', $todefaultifmissing = 0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var CommonObject $this
|
||||
* @var CommonObject|Facture $this
|
||||
* @var CommonObject $object
|
||||
* @var CommonObjectLine $line
|
||||
* @var ExtraFields $extrafields
|
||||
|
|
@ -56,7 +56,7 @@ if (empty($object) || !is_object($object)) {
|
|||
}
|
||||
|
||||
'
|
||||
@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject|Facture $this
|
||||
@phan-var-force CommonObject $object
|
||||
@phan-var-force Societe $buyer
|
||||
@phan-var-force Societe $seller
|
||||
|
|
@ -159,7 +159,7 @@ if ($nolinesbefore) {
|
|||
<td class="linecoldiscount right"><?php echo $langs->trans('ReductionShort'); ?></td>
|
||||
<?php
|
||||
// Fields for situation invoice
|
||||
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
if (property_exists($this, 'situation_cycle_ref') && isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
print '<td class="linecolcycleref right">'.$langs->trans('Progress').'</td>';
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
|
||||
print '<td class="nobottom nowrap right"></td>';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @var CommonObject $this
|
||||
* @var CommonObject|Facture $this
|
||||
* @var CommonObject $object
|
||||
* @var CommonObjectLine $line
|
||||
* @var Form $form
|
||||
|
|
@ -52,7 +52,7 @@ if (empty($object) || !is_object($object)) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
'@phan-var-force CommonObject $this
|
||||
'@phan-var-force CommonObject|Facture $this
|
||||
@phan-var-force CommonObject $object';
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
|
||||
|
|
@ -159,7 +159,7 @@ if (in_array($object->element, array('propal', 'commande', 'facture')) && $objec
|
|||
print '</th>';
|
||||
|
||||
// Fields for situation invoice
|
||||
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
if (property_exists($this, 'situation_cycle_ref') && isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
print '<th class="linecolcycleref right">'.$langs->trans('CumulativeProgression').'</th>';
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
|
||||
print '<th class="linecolcycleref2 right">' . $langs->trans('SituationInvoiceProgressCurrent') . '</th>';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -19,9 +19,9 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var CommonObject $this
|
||||
* @var CommonObjectLine $line
|
||||
* @var Propal|Contrat|Commande|Facture|Expedition|Delivery|CommandeFournisseur|FactureFournisseur|SupplierProposal $object
|
||||
* @var Propal|Contrat|Commande|Facture|Expedition|Delivery|CommandeFournisseur|FactureFournisseur|SupplierProposal $this
|
||||
* @var CommonObjectLine|CommonInvoiceLine|CommonOrderLine|ExpeditionLigne|PropaleLigne $line
|
||||
* @var Conf $conf
|
||||
* @var Form $form
|
||||
* @var Societe $mysoc
|
||||
|
|
@ -35,8 +35,8 @@
|
|||
|
||||
'
|
||||
@phan-var-force CommonObjectLine|CommonInvoiceLine|CommonOrderLine|ExpeditionLigne|PropaleLigne $line
|
||||
@phan-var-force CommonObject $this
|
||||
@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|FactureFournisseur|FactureFournisseur|SupplierProposal $object
|
||||
@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|CommandeFournisseur|FactureFournisseur|SupplierProposal $this
|
||||
@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|CommandeFournisseur|FactureFournisseur|SupplierProposal $object
|
||||
@phan-var-force int $num
|
||||
';
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ if ($line->qty > 0) { ?>
|
|||
</td>
|
||||
<?php
|
||||
// Handling if situation invoices conf is enabled
|
||||
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
if (property_exists($this, 'situation_cycle_ref') && isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
print '<td class="linecolcycleref nowrap right"></td>';
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
|
||||
print '<td class="nowrap right"></td>';
|
||||
|
|
@ -167,7 +167,7 @@ if ($line->qty > 0) { ?>
|
|||
// Base colspan if there is no module activated to display line correctly
|
||||
$colspan = 3;
|
||||
|
||||
if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
if (property_exists($this, 'situation_cycle_ref') && isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
|
||||
$colspan += 2;
|
||||
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) {
|
||||
$colspan += 1;
|
||||
|
|
@ -253,7 +253,7 @@ if ($this->status == 0) {
|
|||
echo '</a> </td>';
|
||||
|
||||
// Move up-down picto
|
||||
if ($num > 1 && $conf->browser->layout != 'phone' && ((property_exists($this, 'situation_counter') && $this->situation_counter == 1) || empty($this->situation_cycle_ref)) && empty($disablemove)) {
|
||||
if ($num > 1 && $conf->browser->layout != 'phone' && ((property_exists($this, 'situation_counter') && $this->situation_counter == 1) || (property_exists($this, 'situation_cycle_ref') && empty($this->situation_cycle_ref))) && empty($disablemove)) {
|
||||
echo '<td class="linecolmove tdlineupdown center"';
|
||||
if (!colorIsLight($line_color)) {
|
||||
echo 'data-gripimg="grip_title.png"';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 Quentin VIAL--GOUTEYRON <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Quentin VIAL--GOUTEYRON <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Charlene Benke <cf.benke@patas-monkey.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Charlene Benke <cf.benke@patas-monkey.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -26,14 +27,18 @@ global $user;
|
|||
global $noMoreLinkedObjectBlockAfter;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/** @var Translate $langs */
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
|
||||
'@phan-var-force Don[] $linkedObjectBlock';
|
||||
/** @var Don[] $linkedObjectBlock */
|
||||
$langs->load("donations");
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
$lastObjectLink = null;
|
||||
foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
'@phan-var-force Don $objectlink';
|
||||
$ilink++;
|
||||
|
||||
$trclass = 'oddeven';
|
||||
|
|
@ -43,7 +48,8 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||
print '<tr class="'.$trclass.'">';
|
||||
print '<td>'.$langs->trans("Donation").'</td>';
|
||||
print '<td>'.$objectlink->getNomUrl(1).'</td>';
|
||||
print '<td class="center">'.$objectlink->ref_client.'</td>';
|
||||
// print '<td class="center">'.$objectlink->ref_client.'</td>'; // ref_client doesn't exists
|
||||
print '<td class="center"></td>';
|
||||
print '<td class="center">'.dol_print_date($objectlink->date, 'day').'</td>';
|
||||
print '<td class="right">';
|
||||
$total += $objectlink->total_ht;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -31,8 +32,10 @@ global $user;
|
|||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/** @var Translate $langs */
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock';
|
||||
'@phan-var-force Expedition[] $linkedObjectBlock';
|
||||
/** @var Expedition[] $linkedObjectBlock */
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("sendings");
|
||||
|
|
|
|||
|
|
@ -298,9 +298,10 @@ class CommandeFournisseur extends CommonOrder
|
|||
public $line;
|
||||
|
||||
/**
|
||||
* @var CommonObject Add for supplier_proposal
|
||||
* @var CommonObject|string|null Add for supplier_proposal
|
||||
*/
|
||||
public $origin;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1340,10 +1340,11 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
$object->origin = $origin;
|
||||
$object->origin_type = $origin;
|
||||
$object->origin_id = $originid;
|
||||
|
||||
// Possibility to add external linked objects with hooks
|
||||
$object->linked_objects[$object->origin] = $object->origin_id;
|
||||
$object->linked_objects[$object->origin_type] = $object->origin_id;
|
||||
$other_linked_objects = GETPOST('other_linked_objects', 'array');
|
||||
if (!empty($other_linked_objects)) {
|
||||
$object->linked_objects = array_merge($object->linked_objects, $other_linked_objects);
|
||||
|
|
@ -1355,7 +1356,7 @@ if (empty($reshook)) {
|
|||
|
||||
$srcobject = new $classname($db);
|
||||
|
||||
dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines");
|
||||
dol_syslog("Try to find source object origin=".$object->origin_type." originid=".$object->origin_id." to add lines");
|
||||
$result = $srcobject->fetch($object->origin_id);
|
||||
if ($result > 0) {
|
||||
$tmpdate = $srcobject->delivery_date;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -35,8 +35,8 @@ $langs = $GLOBALS['langs'];
|
|||
'@phan-var-force Translate $langs';
|
||||
/** @var Translate $langs */
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock';
|
||||
/** @var CommonObject[] $linkedObjectBlock */
|
||||
'@phan-var-force CommandeFournisseur[] $linkedObjectBlock';
|
||||
/** @var CommandeFournisseur[] $linkedObjectBlock */
|
||||
|
||||
$langs->load("orders");
|
||||
|
||||
|
|
|
|||
|
|
@ -1141,7 +1141,8 @@ if (empty($reshook)) {
|
|||
if ($element == 'project') {
|
||||
$element = 'projet';
|
||||
}
|
||||
$object->origin = GETPOST('origin', 'alpha');
|
||||
$object->origin_type = GETPOST('origin', 'alpha');
|
||||
$object->origin = $object->origin_type;
|
||||
$object->origin_id = GETPOSTINT('originid');
|
||||
|
||||
|
||||
|
|
@ -1154,12 +1155,12 @@ if (empty($reshook)) {
|
|||
$objectsrc->fetch($originid);
|
||||
$objectsrc->fetch_thirdparty();
|
||||
|
||||
if (!empty($object->origin) && !empty($object->origin_id)) {
|
||||
$object->linkedObjectsIds[$object->origin] = $object->origin_id;
|
||||
if (!empty($object->origin_type) && !empty($object->origin_id)) {
|
||||
$object->linkedObjectsIds[$object->origin_type] = $object->origin_id;
|
||||
}
|
||||
|
||||
// Add also link with order if object is reception
|
||||
if ($object->origin == 'reception') {
|
||||
if ($object->origin_type == 'reception') {
|
||||
$objectsrc->fetchObjectLinked();
|
||||
|
||||
if (count($objectsrc->linkedObjectsIds['order_supplier']) > 0) {
|
||||
|
|
@ -1285,7 +1286,7 @@ if (empty($reshook)) {
|
|||
0,
|
||||
array(), // array_options
|
||||
null,
|
||||
$object->origin,
|
||||
$object->origin_type,
|
||||
0,
|
||||
'',
|
||||
0, // special_code
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -35,9 +36,8 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'
|
||||
@phan-var-force array<string,CommonObject> $linkedObjectBlock
|
||||
';
|
||||
'@phan-var-force FactureFournisseur[] $linkedObjectBlock';
|
||||
/** @var FactureFournisseur[] $linkedObjectBlock */
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2017-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2014-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020-2021 Udo Tamm <dev@dolibit.de>
|
||||
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2024 Charlene Benke <charlene@patas-monkey.com>
|
||||
|
|
@ -189,7 +189,7 @@ if (empty($reshook)) {
|
|||
$date_fin_gmt = GETPOSTDATE('date_fin_', '00:00:00', 1);
|
||||
$starthalfday = GETPOST('starthalfday');
|
||||
$endhalfday = GETPOST('endhalfday');
|
||||
$type = GETPOST('type');
|
||||
$type = GETPOSTINT('type');
|
||||
$halfday = 0;
|
||||
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') {
|
||||
$halfday = 2;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) ---Replace with your own copyright and developer email---
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @var ?Conf $conf
|
||||
* @var CommonObject $object
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
// Protection to avoid direct call of template
|
||||
|
|
@ -38,8 +38,10 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/** @var Translate $langs */
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force array<string,MyObject> $linkedObjectBlock';
|
||||
'@phan-var-force MyObject[] $linkedObjectBlock';
|
||||
/** @var MyObject[] $linkedObjectBlock */
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("mymodule");
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* Copyright (C) 2016-2022 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2020 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2022 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
|
|
@ -120,7 +120,7 @@ $cancel = GETPOST('cancel', 'alpha');
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$socid = GETPOSTINT('socid');
|
||||
$duration_value = GETPOST('duration_value'); // duration value can be an empty string
|
||||
$duration_value = GETPOST('duration_value') === '' ? null : GETPOSTINT('duration_value'); // duration value can be an empty string
|
||||
$duration_unit = GETPOST('duration_unit', 'alpha');
|
||||
|
||||
$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
|
||||
|
|
@ -151,6 +151,7 @@ if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php'
|
|||
$result = dol_include_once('/core/modules/product/'.$module.'.php');
|
||||
if ($result > 0) {
|
||||
$modCodeProduct = new $module();
|
||||
/** @var ModeleProductCode $modCodeProduct */
|
||||
}
|
||||
|
||||
$object = new Product($db);
|
||||
|
|
@ -549,11 +550,11 @@ if (empty($reshook)) {
|
|||
if (!$error) {
|
||||
$units = GETPOSTINT('units');
|
||||
|
||||
$object->entity = $conf->entity;
|
||||
$object->ref = (string) $ref;
|
||||
$object->label = GETPOST('label', $label_security_check);
|
||||
$object->price_base_type = GETPOST('price_base_type', 'aZ09');
|
||||
$object->mandatory_period = empty(GETPOST("mandatoryperiod", 'alpha')) ? 0 : 1;
|
||||
$object->entity = $conf->entity;
|
||||
$object->ref = (string) $ref;
|
||||
$object->label = GETPOST('label', $label_security_check);
|
||||
$object->price_base_type = GETPOST('price_base_type', 'aZ09');
|
||||
$object->mandatory_period = empty(GETPOST("mandatoryperiod", 'alpha')) ? 0 : 1;
|
||||
if ($object->price_base_type == 'TTC') {
|
||||
$object->price_ttc = GETPOSTFLOAT('price');
|
||||
} else {
|
||||
|
|
@ -606,8 +607,8 @@ if (empty($reshook)) {
|
|||
$object->localtax1_type = $localtax1_type;
|
||||
$object->localtax2_type = $localtax2_type;
|
||||
|
||||
$object->type = $type;
|
||||
$object->status = GETPOSTINT('statut');
|
||||
$object->type = $type;
|
||||
$object->status = GETPOSTINT('statut');
|
||||
$object->status_buy = GETPOSTINT('statut_buy');
|
||||
$object->status_batch = GETPOSTINT('status_batch');
|
||||
$object->sell_or_eat_by_mandatory = GETPOSTINT('sell_or_eat_by_mandatory');
|
||||
|
|
@ -625,38 +626,38 @@ if (empty($reshook)) {
|
|||
$mesg = 'Failed to get bar code type information ';
|
||||
setEventMessages($mesg.$stdobject->error, $stdobject->errors, 'errors');
|
||||
}
|
||||
$object->barcode_type_code = $stdobject->barcode_type_code;
|
||||
$object->barcode_type_coder = $stdobject->barcode_type_coder;
|
||||
$object->barcode_type_label = $stdobject->barcode_type_label;
|
||||
$object->barcode_type_code = $stdobject->barcode_type_code;
|
||||
$object->barcode_type_coder = $stdobject->barcode_type_coder;
|
||||
$object->barcode_type_label = $stdobject->barcode_type_label;
|
||||
|
||||
$object->description = dol_htmlcleanlastbr(GETPOST('desc', 'restricthtml'));
|
||||
$object->description = dol_htmlcleanlastbr(GETPOST('desc', 'restricthtml'));
|
||||
$object->url = GETPOST('url');
|
||||
$object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'restricthtml'));
|
||||
$object->note = $object->note_private; // deprecated
|
||||
$object->customcode = GETPOST('customcode', 'alphanohtml');
|
||||
$object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'restricthtml'));
|
||||
$object->note = $object->note_private; // deprecated
|
||||
$object->customcode = GETPOST('customcode', 'alphanohtml');
|
||||
$object->country_id = GETPOSTINT('country_id');
|
||||
$object->state_id = GETPOSTINT('state_id');
|
||||
$object->lifetime = GETPOSTINT('lifetime');
|
||||
$object->qc_frequency = GETPOSTINT('qc_frequency');
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse');
|
||||
$object->fk_default_workstation = GETPOSTINT('fk_default_workstation');
|
||||
$object->seuil_stock_alerte = GETPOST('seuil_stock_alerte') ? GETPOST('seuil_stock_alerte') : 0;
|
||||
$object->desiredstock = GETPOST('desiredstock') ? GETPOST('desiredstock') : 0;
|
||||
$object->canvas = GETPOST('canvas');
|
||||
$object->net_measure = GETPOST('net_measure');
|
||||
$object->net_measure_units = GETPOST('net_measure_units') === '' ? null : GETPOSTINT('net_measure_units'); // This is not the fk_unit but the power of unit
|
||||
$object->weight = GETPOST('weight');
|
||||
$object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit
|
||||
$object->length = GETPOST('size');
|
||||
$object->length_units = GETPOST('size_units'); // This is not the fk_unit but the power of unit
|
||||
$object->lifetime = GETPOSTINT('lifetime');
|
||||
$object->qc_frequency = GETPOSTINT('qc_frequency');
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse');
|
||||
$object->fk_default_workstation = GETPOSTINT('fk_default_workstation');
|
||||
$object->seuil_stock_alerte = GETPOST('seuil_stock_alerte') ? GETPOST('seuil_stock_alerte') : 0;
|
||||
$object->desiredstock = GETPOST('desiredstock') ? GETPOST('desiredstock') : 0;
|
||||
$object->canvas = GETPOST('canvas');
|
||||
$object->net_measure = GETPOST('net_measure');
|
||||
$object->net_measure_units = GETPOST('net_measure_units') === '' ? null : GETPOSTINT('net_measure_units'); // This is not the fk_unit but the power of unit
|
||||
$object->weight = GETPOST('weight');
|
||||
$object->weight_units = GETPOST('weight_units') === '' ? null : GETPOSTINT('weight_units'); // This is not the fk_unit but the power of unit
|
||||
$object->length = GETPOST('size');
|
||||
$object->length_units = GETPOST('size_units') === '' ? null : GETPOSTINT('size_units'); // This is not the fk_unit but the power of unit
|
||||
$object->width = GETPOST('sizewidth');
|
||||
$object->height = GETPOST('sizeheight');
|
||||
$object->surface = GETPOST('surface');
|
||||
$object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit
|
||||
$object->volume = GETPOST('volume');
|
||||
$object->volume_units = GETPOST('volume_units'); // This is not the fk_unit but the power of unit
|
||||
$object->height = GETPOST('sizeheight');
|
||||
$object->surface = GETPOST('surface');
|
||||
$object->surface_units = GETPOST('surface_units') === '' ? null : GETPOSTINT('surface_units'); // This is not the fk_unit but the power of unit
|
||||
$object->volume = GETPOST('volume');
|
||||
$object->volume_units = GETPOST('volume_units') === '' ? null : GETPOSTINT('volume_units'); // This is not the fk_unit but the power of unit
|
||||
$finished = GETPOSTINT('finished');
|
||||
if ($finished >= 0) {
|
||||
$object->finished = $finished;
|
||||
|
|
@ -719,7 +720,7 @@ if (empty($reshook)) {
|
|||
$object->multiprices["$i"] = (float) price2num(GETPOST("price_".$i), 'MU');
|
||||
$object->multiprices_base_type["$i"] = GETPOST("multiprices_base_type_".$i);
|
||||
} else {
|
||||
$object->multiprices["$i"] = "";
|
||||
$object->multiprices["$i"] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -733,6 +734,7 @@ if (empty($reshook)) {
|
|||
if (!$ref && getDolGlobalString('PRODUCT_GENERATE_REF_AFTER_FORM')) {
|
||||
// Generate ref...
|
||||
'@phan-var ModeleProductCode $modCodeProduct';
|
||||
/** @var ModeleProductCode $modCodeProduct */
|
||||
$ref = $modCodeProduct->getNextValue($object, $type);
|
||||
}
|
||||
|
||||
|
|
@ -794,50 +796,50 @@ if (empty($reshook)) {
|
|||
if (!getDolGlobalString('PRODUCT_GENERATE_REF_AFTER_FORM')) {
|
||||
$object->ref = (string) $ref;
|
||||
}
|
||||
$object->label = GETPOST('label', $label_security_check);
|
||||
$object->label = GETPOST('label', $label_security_check);
|
||||
|
||||
$desc = dol_htmlcleanlastbr(preg_replace('/ $/', '', GETPOST('desc', 'restricthtml')));
|
||||
$object->description = $desc;
|
||||
$object->description = $desc;
|
||||
|
||||
$object->url = GETPOST('url');
|
||||
if (getDolGlobalString('MAIN_DISABLE_NOTES_TAB')) {
|
||||
$object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'restricthtml'));
|
||||
$object->note = $object->note_private;
|
||||
}
|
||||
$object->customcode = GETPOST('customcode', 'alpha');
|
||||
$object->customcode = GETPOST('customcode', 'alpha');
|
||||
$object->country_id = GETPOSTINT('country_id');
|
||||
$object->state_id = GETPOSTINT('state_id');
|
||||
$object->lifetime = GETPOSTINT('lifetime');
|
||||
$object->qc_frequency = GETPOSTINT('qc_frequency');
|
||||
$object->status = GETPOSTINT('statut');
|
||||
$object->status_buy = GETPOSTINT('statut_buy');
|
||||
$object->lifetime = GETPOSTINT('lifetime');
|
||||
$object->qc_frequency = GETPOSTINT('qc_frequency');
|
||||
$object->status = GETPOSTINT('statut');
|
||||
$object->status_buy = GETPOSTINT('statut_buy');
|
||||
$object->status_batch = GETPOSTINT('status_batch');
|
||||
$object->sell_or_eat_by_mandatory = GETPOSTINT('sell_or_eat_by_mandatory');
|
||||
$object->batch_mask = GETPOST('batch_mask', 'alpha');
|
||||
$object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse');
|
||||
$object->fk_default_workstation = GETPOSTINT('fk_default_workstation');
|
||||
$object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse');
|
||||
$object->fk_default_workstation = GETPOSTINT('fk_default_workstation');
|
||||
// removed from update view so GETPOST always empty
|
||||
/*
|
||||
$object->seuil_stock_alerte = GETPOST('seuil_stock_alerte');
|
||||
$object->desiredstock = GETPOST('desiredstock');
|
||||
$object->seuil_stock_alerte = GETPOST('seuil_stock_alerte');
|
||||
$object->desiredstock = GETPOST('desiredstock');
|
||||
*/
|
||||
$object->duration_value = GETPOST('duration_value');
|
||||
$object->duration_unit = GETPOST('duration_unit', 'alpha');
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
|
||||
$object->canvas = GETPOST('canvas');
|
||||
$object->net_measure = GETPOST('net_measure');
|
||||
$object->net_measure_units = GETPOST('net_measure_units') === '' ? null : GETPOSTINT('net_measure_units'); // This is not the fk_unit but the power of unit
|
||||
$object->weight = GETPOST('weight');
|
||||
$object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit
|
||||
$object->length = GETPOST('size');
|
||||
$object->length_units = GETPOST('size_units'); // This is not the fk_unit but the power of unit
|
||||
$object->canvas = GETPOST('canvas');
|
||||
$object->net_measure = GETPOST('net_measure');
|
||||
$object->net_measure_units = GETPOST('net_measure_units') === '' ? null : GETPOSTINT('net_measure_units'); // This is not the fk_unit but the power of unit
|
||||
$object->weight = GETPOST('weight');
|
||||
$object->weight_units = GETPOST('weight_units') === '' ? null : GETPOSTINT('weight_units'); // This is not the fk_unit but the power of unit
|
||||
$object->length = GETPOST('size');
|
||||
$object->length_units = GETPOST('size_units') === '' ? null : GETPOSTINT('size_units'); // This is not the fk_unit but the power of unit
|
||||
$object->width = GETPOST('sizewidth');
|
||||
$object->height = GETPOST('sizeheight');
|
||||
|
||||
$object->surface = GETPOST('surface');
|
||||
$object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit
|
||||
$object->volume = GETPOST('volume');
|
||||
$object->volume_units = GETPOST('volume_units'); // This is not the fk_unit but the power of unit
|
||||
$object->surface = GETPOST('surface');
|
||||
$object->surface_units = GETPOST('surface_units') === '' ? null : GETPOSTINT('surface_units'); // This is not the fk_unit but the power of unit
|
||||
$object->volume = GETPOST('volume');
|
||||
$object->volume_units = GETPOST('volume_units') === '' ? null : GETPOSTINT('volume_units'); // This is not the fk_unit but the power of unit
|
||||
|
||||
$finished = GETPOSTINT('finished');
|
||||
if ($finished >= 0) {
|
||||
|
|
@ -854,8 +856,8 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
// managed_in_stock
|
||||
$object->stockable_product = (int) GETPOSTISSET('stockable_product');
|
||||
if ($object->status_batch > 0 && $object->stockable_product == 0 && isModEnabled('stock') && isModEnabled('productbatch')) {
|
||||
$object->stockable_product = (int) GETPOSTISSET('stockable_product');
|
||||
if ($object->status_batch > 0 && $object->stockable_product == 0 && isModEnabled('stock') && isModEnabled('productbatch')) {
|
||||
$object->stockable_product = 1;
|
||||
setEventMessages($langs->trans('ForceBatchesNeedStockManagement'), null, 'warnings');
|
||||
}
|
||||
|
|
@ -879,9 +881,9 @@ if (empty($reshook)) {
|
|||
$mesg = 'Failed to get bar code type information ';
|
||||
setEventMessages($mesg.$stdobject->error, $stdobject->errors, 'errors');
|
||||
}
|
||||
$object->barcode_type_code = $stdobject->barcode_type_code;
|
||||
$object->barcode_type_coder = $stdobject->barcode_type_coder;
|
||||
$object->barcode_type_label = $stdobject->barcode_type_label;
|
||||
$object->barcode_type_code = $stdobject->barcode_type_code;
|
||||
$object->barcode_type_coder = $stdobject->barcode_type_coder;
|
||||
$object->barcode_type_label = $stdobject->barcode_type_label;
|
||||
|
||||
$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
|
||||
$accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha');
|
||||
|
|
@ -1457,6 +1459,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$result = dol_include_once('/core/modules/product/'.$module.'.php');
|
||||
if ($result > 0) {
|
||||
$modCodeProduct = new $module();
|
||||
/** @var ModeleProductCode $modCodeProduct */
|
||||
}
|
||||
|
||||
dol_set_focus('input[name="ref"]');
|
||||
|
|
@ -1504,6 +1507,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
print '<tr>';
|
||||
$tmpcode = '';
|
||||
if (!empty($modCodeProduct->code_auto)) {
|
||||
/** @var ModeleProductCode $modCodeProduct */
|
||||
$tmpcode = $modCodeProduct->getNextValue($object, $type);
|
||||
}
|
||||
print '<td class="titlefieldcreate fieldrequired">'.$langs->trans("ProductRef").'</td><td><input id="ref" name="ref" class="maxwidth200" maxlength="128" value="'.dol_escape_htmltag(GETPOSTISSET('ref') ? GETPOST('ref', 'alphanohtml') : $tmpcode).'">';
|
||||
|
|
@ -3027,6 +3031,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
|
||||
$tmpcode = '';
|
||||
if (!empty($modCodeProduct->code_auto)) {
|
||||
/** @var ModeleProductCode $modCodeProduct */
|
||||
$tmpcode = $modCodeProduct->getNextValue($object, $object->type);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2016 Francis Appels <francis.appels@yahoo.com>
|
||||
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022-2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2023 Christian Foellmann <christian@foellmann.de>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
|
|
@ -216,15 +216,15 @@ if (empty($reshook)) {
|
|||
if ($action == 'update' && !$cancel && $user->hasRight('stock', 'creer')) {
|
||||
if ($object->fetch($id)) {
|
||||
$object->label = GETPOST("libelle");
|
||||
$object->fk_parent = GETPOST("fk_parent");
|
||||
$object->fk_parent = GETPOSTINT("fk_parent");
|
||||
$object->fk_project = GETPOSTINT('projectid');
|
||||
$object->description = GETPOST("desc", 'restricthtml');
|
||||
$object->statut = GETPOST("statut");
|
||||
$object->lieu = GETPOST("lieu");
|
||||
$object->address = GETPOST("address");
|
||||
$object->zip = GETPOST("zipcode");
|
||||
$object->town = GETPOST("town");
|
||||
$object->country_id = GETPOSTINT("country_id");
|
||||
$object->statut = GETPOSTINT("statut");
|
||||
$object->lieu = GETPOST("lieu");
|
||||
$object->address = GETPOST("address");
|
||||
$object->zip = GETPOST("zipcode");
|
||||
$object->town = GETPOST("town");
|
||||
$object->country_id = GETPOSTINT("country_id");
|
||||
$object->phone = GETPOST("phone");
|
||||
$object->fax = GETPOST("fax");
|
||||
|
||||
|
|
|
|||
|
|
@ -1983,7 +1983,7 @@ if ($action == 'create') {
|
|||
$htmltooltip .= '<br>';
|
||||
}
|
||||
$reception_static->fetch($receptionline_var['reception_id']);
|
||||
$htmltooltip .= $reception_static->getNomUrl(1, 0, 0, 0, 1);
|
||||
$htmltooltip .= $reception_static->getNomUrl(1, '', 0, 0, 1);
|
||||
$htmltooltip .= ' - '.$receptionline_var['qty'];
|
||||
|
||||
$htmltext = $langs->trans("DateValidation").' : '.(empty($receptionline_var['date_valid']) ? $langs->trans("Draft") : dol_print_date($receptionline_var['date_valid'], 'dayhour'));
|
||||
|
|
|
|||
|
|
@ -36,14 +36,20 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/**
|
||||
* @var Translate $langs
|
||||
* @var CommonObject $object
|
||||
*/
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock';
|
||||
'@phan-var-force Reception[] $linkedObjectBlock';
|
||||
/** @var Reception[] $linkedObjectBlock */
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("receptions");
|
||||
|
||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
|
||||
'@phan-var-force Reception[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
|
||||
/** @var Reception[] $linkedObjectBlock */
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2018 Jean-François Ferry <hello+jf@librethic.io>
|
||||
* Copyright (C) 2016 Gilles Poirier <glgpoirier@gmail.com>
|
||||
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2013-2018 Jean-François Ferry <hello+jf@librethic.io>
|
||||
* Copyright (C) 2016 Gilles Poirier <glgpoirier@gmail.com>
|
||||
* Copyright (C) 2019 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -52,9 +52,9 @@ if (isModEnabled("product") || isModEnabled("service")) {
|
|||
$langs->loadLangs(array('resource', 'other', 'interventions'));
|
||||
|
||||
/*
|
||||
$sortorder = GETPOST('sortorder','alpha');
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
$page = GETPOST('page','int');
|
||||
$sortorder = GETPOST('sortorder','alpha');
|
||||
$sortfield = GETPOST('sortfield','alpha');
|
||||
$page = GETPOST('page','int');
|
||||
*/
|
||||
|
||||
$object = new Dolresource($db);
|
||||
|
|
@ -145,7 +145,7 @@ if (empty($reshook)) {
|
|||
if ($isFullDayEvent) {
|
||||
$eventDateStartArr = dol_getdate($eventDateStart);
|
||||
$eventDateStart = dol_mktime(0, 0, 0, $eventDateStartArr['mon'], $eventDateStartArr['mday'], $eventDateStartArr['year']);
|
||||
$eventDateEnd = dol_mktime(23, 59, 59, $eventDateStartArr['mon'], $eventDateStartArr['mday'], $eventDateStartArr['year']);
|
||||
$eventDateEnd = dol_mktime(23, 59, 59, $eventDateStartArr['mon'], $eventDateStartArr['mday'], $eventDateStartArr['year']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -29,11 +30,13 @@ print "<!-- BEGIN PHP TEMPLATE LINKEDOBJECTBOCK-->\n";
|
|||
|
||||
|
||||
global $user;
|
||||
|
||||
/** @var User $user */
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/** '@var Translate $langs */
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force CommonObject[] $linkedObjectBlock';
|
||||
'@phan-var-force SupplierProposal[] $linkedObjectBlock';
|
||||
/** @var SupplierProposal[] $linkedObjectBlock */
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
|
|
@ -48,7 +51,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||
<td><?php echo $langs->trans("SupplierProposal"); ?></td>
|
||||
<td><a href="<?php echo DOL_URL_ROOT.'/supplier_proposal/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowSupplierProposal"), "supplier_proposal").' '.$objectlink->ref; ?></a></td>
|
||||
<td></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->datec, 'day'); ?></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->date_creation, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
if ($user->hasRight('supplier_proposal', 'lire')) {
|
||||
$total += $objectlink->total_ht;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022-2023 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -1666,7 +1666,7 @@ $( document ).ready(function() {
|
|||
$result = $adh->fetch(0, '', $invoice->socid);
|
||||
if ($result > 0) {
|
||||
$adh->ref = $adh->getFullName($langs);
|
||||
if (empty($adh->statut) || $adh->statut == Adherent::STATUS_EXCLUDED) {
|
||||
if (empty($adh->status) || $adh->status == Adherent::STATUS_EXCLUDED) {
|
||||
$s .= "<s>";
|
||||
}
|
||||
$s .= $adh->getFullName($langs);
|
||||
|
|
@ -1678,11 +1678,11 @@ $( document ).ready(function() {
|
|||
}
|
||||
} else {
|
||||
$s .= '<br>'.$langs->trans("SubscriptionNotReceived");
|
||||
if ($adh->statut > 0) {
|
||||
if ($adh->status > 0) {
|
||||
$s .= " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
|
||||
}
|
||||
}
|
||||
if (empty($adh->statut) || $adh->statut == Adherent::STATUS_EXCLUDED) {
|
||||
if (empty($adh->status) || $adh->status == Adherent::STATUS_EXCLUDED) {
|
||||
$s .= "</s>";
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1872,6 +1872,8 @@ if (!empty($_SESSION["basiclayout"]) && $_SESSION["basiclayout"] == 1) {
|
|||
$catid = GETPOSTINT('catid');
|
||||
$result = $object->fetch($catid);
|
||||
$prods = $object->getObjectsInCateg("product");
|
||||
/** @var Product[] $prods */
|
||||
'@phan-var-force Product[] $prods';
|
||||
$htmlforlines = '';
|
||||
foreach ($prods as $row) {
|
||||
if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) - 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -30,8 +31,13 @@ global $noMoreLinkedObjectBlockAfter;
|
|||
|
||||
$langs = $GLOBALS['langs'];
|
||||
'@phan-var-force Translate $langs';
|
||||
/**
|
||||
* @var Translate $langs
|
||||
* @var CommonObject $object
|
||||
*/
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
'@phan-var-force Ticket[] $linkedObjectBlock';
|
||||
/** @var Ticket[] $linkedObjectBlock */
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load('ticket');
|
||||
|
|
|
|||
Loading…
Reference in a new issue