2
0
forked from Wavyzz/dolibarr

test action (#31815)

* NEW : Add category feature on Fichinter

category update

* Update viewcat.php

* Update categories.lang

* Update categorie.class.php

* Update categories.lang

* Update viewcat.php

* Update viewcat.php

* test action

* test action

* test action

* test action

* test action

* test action

* test action

* test action

* test action

* test action

* test action

* clean baseline

Debug v21

NEW: use Expedition::$date_shipping property in card and list (#31701)

* NEW: use Expedition::$date_shipping property in card and list

* FIX: translation

* FIX: PHPStan rebutal

* FIX: not a great idea to copy and not edit comment

* FIX: on create, expected delivery date should precede sending date

* Update card.php

* Update list.php

* Update list.php

* Update list.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

clean baseline

clean baseline

clean baseline

* clean baseline

* clean baseline

* merge

* fix

* fix

* fix

* fix

* fix

* fix

* fix translations

* fix translations

* fix translations

* fix translations

* fix

* fix filters

* fix filters

* fix filters

* fix filters

* fix

---------

Co-authored-by: Charlène Benke <1179011+defrance@users.noreply.github.com>
This commit is contained in:
Frédéric FRANCE
2024-11-15 14:09:04 +01:00
committed by GitHub
parent b6c03773e9
commit ec91ed2af9
37 changed files with 361 additions and 286 deletions

View File

@@ -3041,7 +3041,13 @@ if ($action == 'create' && $usercancreate) {
// Create a purchase order
if (!getDolGlobalInt('COMMANDE_DISABLE_ADD_PURCHASE_ORDER')) {
$arrayforbutaction[] = array('lang' => 'orders', 'enabled' => (isModEnabled("supplier_order") && $object->statut > Commande::STATUS_DRAFT), 'perm' => $usercancreatepurchaseorder, 'label' => 'AddPurchaseOrder', 'url' => '/fourn/commande/card.php?action=create&amp;origin='.urlencode($object->element).'&amp;originid='.((int) $object->id));
$arrayforbutaction[] = array(
'lang' => 'orders',
'enabled' => (isModEnabled("supplier_order") && $object->statut > Commande::STATUS_DRAFT),
'perm' => $usercancreatepurchaseorder,
'label' => 'AddPurchaseOrder',
'url' => '/fourn/commande/card.php?action=create&amp;origin=' . urlencode($object->element) . '&amp;originid=' . ((int) $object->id)
);
}
/*if (isModEnabled("supplier_order") && $object->statut > Commande::STATUS_DRAFT && $object->getNbOfServicesLines() > 0) {
@@ -3051,8 +3057,14 @@ if ($action == 'create' && $usercancreate) {
}*/
// Create intervention
$arrayforbutaction[] = array('lang' => 'interventions', 'enabled' => (isModEnabled("intervention") && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0), 'perm' => $user->hasRight('ficheinter', 'creer'), 'label' => 'AddIntervention', 'url' => '/fichinter/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid);
/*if (isModEnabled('intervention')) {
$arrayforbutaction[] = array(
'lang' => 'interventions',
'enabled' => (isModEnabled("intervention") && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0),
'perm' => ($user->hasRight('ficheinter', 'creer') == 1),
'label' => 'AddIntervention',
'url' => '/fichinter/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid,
);
/*if (isModEnabled('ficheinter')) {
$langs->load("interventions");
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) {
@@ -3065,7 +3077,13 @@ if ($action == 'create' && $usercancreate) {
}*/
// Create contract
$arrayforbutaction[] = array('lang' => 'contracts', 'enabled' => (isModEnabled("contract") && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)), 'perm' => $user->hasRight('contrat', 'creer'), 'label' => 'AddContract', 'url' => '/contrat/card.php?action=create&amp;origin='.$object->element.'&amp;originid='.$object->id.'&amp;socid='.$object->socid);
$arrayforbutaction[] = array(
'lang' => 'contracts',
'enabled' => (isModEnabled("contract") && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)),
'perm' => ($user->hasRight('contrat', 'creer') == 1),
'label' => 'AddContract',
'url' => '/contrat/card.php?action=create&amp;origin=' . $object->element . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid,
);
/*if (isModEnabled('contrat') && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) {
$langs->load("contracts");
@@ -3082,7 +3100,13 @@ if ($action == 'create' && $usercancreate) {
// Create shipment
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES'))) {
if ((getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION') && $user->hasRight('expedition', 'creer')) || (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'creer'))) {
$arrayforbutaction[] = array('lang' => 'sendings', 'enabled' => (isModEnabled("shipping") && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), 'perm' => $user->hasRight('expedition', 'creer'), 'label' => 'CreateShipment', 'url' => '/expedition/shipment.php?id='.$object->id);
$arrayforbutaction[] = array(
'lang' => 'sendings',
'enabled' => (isModEnabled("shipping") && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))),
'perm' => $user->hasRight('expedition', 'creer'),
'label' => 'CreateShipment',
'url' => '/expedition/shipment.php?id=' . $object->id
);
/*
if ($user->hasRight('expedition', 'creer')) {
print dolGetButtonAction('', $langs->trans('CreateShipment'), 'default', DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id, '');
@@ -3101,7 +3125,7 @@ if ($action == 'create' && $usercancreate) {
'enabled' => (isModEnabled('invoice') && $object->statut > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0),
'perm' => ($user->hasRight('facture', 'creer') && !getDolGlobalInt('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')),
'label' => 'CreateBill',
'url' => '/compta/facture/card.php?action=create&amp;token='.newToken().'&amp;origin='.urlencode($object->element).'&amp;originid='.$object->id.'&amp;socid='.$object->socid
'url' => '/compta/facture/card.php?action=create&amp;token=' . newToken() . '&amp;origin=' . urlencode($object->element) . '&amp;originid=' . $object->id . '&amp;socid=' . $object->socid
);
/*
if (isModEnabled('facture') && $object->statut > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) {