* phpdoc

* phpdoc

* phpdoc

* phpdoc
This commit is contained in:
Frédéric FRANCE 2024-06-30 21:04:19 +02:00 committed by GitHub
parent 96afcaa476
commit f8a34e7489
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 39 additions and 27 deletions

View File

@ -190,19 +190,19 @@ class Commande extends CommonOrder
public $demand_reason_code;
/**
* @var int Date of order
* @var null|int|'' Date of order
*/
public $date;
/**
* @var int Date of order
* @var null|int|'' Date of order
* @deprecated
* @see $date
*/
public $date_commande;
/**
* @var int Date expected of shipment (date of start of shipment, not the reception that occurs some days after)
* @var null|int|'' Date expected of shipment (date of start of shipment, not the reception that occurs some days after)
*/
public $delivery_date;
@ -363,7 +363,12 @@ class Commande extends CommonOrder
* Shipment on process
*/
const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated
const STATUS_ACCEPTED = 2; // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead.
/**
* For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead.
* @deprecated
*/
const STATUS_ACCEPTED = 2;
/**
* Closed (Sent, billed or not)

View File

@ -3,7 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2024 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
@ -344,7 +344,7 @@ if (isModEnabled('order')) {
}
$sql .= " WHERE c.fk_soc = s.rowid";
$sql .= " AND c.entity IN (".getEntity('commande').")";
$sql .= " AND c.fk_statut = ".((int) Commande::STATUS_ACCEPTED);
$sql .= " AND c.fk_statut = ".((int) Commande::STATUS_SHIPMENTONPROCESS);
if ($socid) {
$sql .= " AND c.fk_soc = ".((int) $socid);
}
@ -360,7 +360,7 @@ if (isModEnabled('order')) {
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<th colspan="4">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status='.Commande::STATUS_ACCEPTED.'"><span class="badge">'.$num.'</span></a></th></tr>';
print '<th colspan="4">'.$langs->trans("OnProcessOrders").' <a href="'.DOL_URL_ROOT.'/commande/list.php?search_status='.Commande::STATUS_SHIPMENTONPROCESS.'"><span class="badge">'.$num.'</span></a></th></tr>';
if ($num) {
$i = 0;

View File

@ -6,8 +6,8 @@
* Copyright (C) 2011-2023 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 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
@ -89,12 +89,12 @@ class Delivery extends CommonObject
public $ref_customer;
/**
* @var integer|string Date really received
* @var int|'' Date really received
*/
public $date_delivery;
/**
* @var integer|string date_valid
* @var int|'' date_valid
*/
public $date_valid;
@ -103,6 +103,9 @@ class Delivery extends CommonObject
*/
public $model_pdf;
/**
* @var int ID of order
*/
public $commande_id;
/**
@ -355,7 +358,7 @@ class Delivery extends CommonObject
$this->label_incoterms = $obj->label_incoterms;
$this->db->free($result);
if ($this->statut == 0) {
if ($this->status == 0) {
$this->draft = 1;
}
@ -509,7 +512,7 @@ class Delivery extends CommonObject
// Set new ref and current status
if (!$error) {
$this->ref = $numref;
$this->statut = 1;
$this->status = 1;
}
dol_syslog(get_class($this)."::valid ok");
@ -650,7 +653,7 @@ class Delivery extends CommonObject
*/
public function deleteLine($lineid)
{
if ($this->statut == 0) {
if ($this->status == 0) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."commandedet";
$sql .= " WHERE rowid = ".((int) $lineid);
@ -912,7 +915,7 @@ class Delivery extends CommonObject
*/
public function getLibStatut($mode = 0)
{
return $this->LibStatut($this->statut, $mode);
return $this->LibStatut($this->status, $mode);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
@ -996,7 +999,7 @@ class Delivery extends CommonObject
$line->fk_product = reset($prodids);
$line->qty_asked = 10;
$line->qty_shipped = 9;
$line->ref = 'REFPROD';
$line->product_ref = 'REFPROD';
$line->label = 'Specimen';
$line->description = 'Description';
$line->price = 100;

View File

@ -4,6 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
* Copyright (C) 2024 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
@ -216,7 +217,7 @@ if (!$user->hasRight('societe', 'client', 'voir')) {
}
$sql .= " WHERE c.fk_soc = s.rowid";
$sql .= " AND c.entity IN (".getEntity('order').")";
$sql .= " AND c.fk_statut IN (".Commande::STATUS_VALIDATED.", ".Commande::STATUS_ACCEPTED.")";
$sql .= " AND c.fk_statut IN (".Commande::STATUS_VALIDATED.", ".Commande::STATUS_SHIPMENTONPROCESS.")";
if ($socid > 0) {
$sql .= " AND c.fk_soc = ".((int) $socid);
}
@ -236,7 +237,7 @@ if ($resql) {
print '<tr class="liste_titre">';
print '<th colspan="3">'.$langs->trans("OrdersToProcess").' ';
print '<a href="'.DOL_URL_ROOT.'/commande/list.php?search_status='.Commande::STATUS_VALIDATED.','.Commande::STATUS_ACCEPTED.'">';
print '<a href="'.DOL_URL_ROOT.'/commande/list.php?search_status='.Commande::STATUS_VALIDATED.','.Commande::STATUS_SHIPMENTONPROCESS.'">';
print '<span class="badge">'.$num.'</span>';
print '</a>';
print '</th>';

View File

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2019 Maxime Kohlhaas <maxime@atm-consulting.fr>
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2019 Maxime Kohlhaas <maxime@atm-consulting.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 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
@ -412,7 +413,7 @@ class Mos extends DolibarrApi
$moline->fk_product = $value["objectid"];
$moline->fk_warehouse = $value["fk_warehouse"];
$moline->qty = $qtytoprocess;
$moline->batch = $tmpproduct->status_batch;
$moline->batch = (string) $tmpproduct->status_batch;
$moline->role = 'toproduce';
$moline->fk_mrp_production = "";
$moline->fk_stock_movement = $idstockmove;
@ -431,7 +432,7 @@ class Mos extends DolibarrApi
$moline->fk_product = $value["objectid"];
$moline->fk_warehouse = $value["fk_warehouse"];
$moline->qty = $qtytoprocess;
$moline->batch = $tmpproduct->status_batch;
$moline->batch = (string) $tmpproduct->status_batch;
$moline->role = 'toconsume';
$moline->fk_mrp_production = "";
$moline->fk_stock_movement = $idstockmove;
@ -457,7 +458,7 @@ class Mos extends DolibarrApi
$moline->fk_product = $value["objectid"];
$moline->fk_warehouse = $value["fk_warehouse"];
$moline->qty = $qtytoprocess;
$moline->batch = $tmpproduct->status_batch;
$moline->batch = (string) $tmpproduct->status_batch;
if ($arrayname == "arraytoconsume") {
$moline->role = 'consumed';
} else {
@ -528,7 +529,7 @@ class Mos extends DolibarrApi
$moline->fk_product = $line->fk_product;
$moline->fk_warehouse = $line->fk_warehouse;
$moline->qty = $qtytoprocess;
$moline->batch = $tmpproduct->status_batch;
$moline->batch = (string) $tmpproduct->status_batch;
$moline->role = 'consumed';
$moline->fk_mrp_production = $line->id;
$moline->fk_stock_movement = $idstockmove;
@ -588,7 +589,7 @@ class Mos extends DolibarrApi
$moline->fk_product = $line->fk_product;
$moline->fk_warehouse = $line->fk_warehouse;
$moline->qty = $qtytoprocess;
$moline->batch = $tmpproduct->status_batch;
$moline->batch = (string) $tmpproduct->status_batch;
$moline->role = 'produced';
$moline->fk_mrp_production = $line->id;
$moline->fk_stock_movement = $idstockmove;

View File

@ -2092,12 +2092,14 @@ class MoLine extends CommonObjectLine
public $qty_frozen;
public $disable_stock_change;
public $efficiency;
/**
* @var string batch reference
*/
public $batch;
public $role;
public $fk_mrp_production;
public $fk_stock_movement;
public $fk_user_creat;
public $fk_user_modif;
public $import_key;
public $fk_parent_line;
public $fk_unit;