diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index bcfaa747cab..fd6794c3d44 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2223,7 +2223,7 @@ if ($action == 'create') } $arrayofinvoiceforpropal = $object->getInvoiceArrayList(); - if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || ! empty($conf->global->WORKFLOW_PROPAL_CAN_CLASSIFIED_BILLED_WITHOUT_INVOICES)) + if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || empty($conf->global->WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED)) { print '
socid . '">' . $langs->trans("ClassifyBilled") . '
'; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 2adab72dc1c..93874ac5e80 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -69,7 +69,7 @@ $search_refcustomer=GETPOST('search_refcustomer','alpha'); $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_ttc=GETPOST('search_montant_ttc','alpha'); -$search_status=GETPOST('search_status','alpha'); +$search_status=GETPOST('search_status','int'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index ea369d8aff3..415a7addf4a 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -30,7 +30,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.1'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.2'); if (! defined('EURO')) define('EURO',chr(128)); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 492663295b8..51602cafe1c 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1571,6 +1571,7 @@ class CommandeFournisseur extends CommonOrder $result=$this->call_trigger('ORDER_SUPPLIER_DELETE',$user); if ($result < 0) { + $this->errors[]='ErrorWhenRunningTrigger'; dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); return -1; } @@ -1583,6 +1584,8 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql) ) { + $this->error=$this->db->lasterror(); + $this->errors[]=$this->db->lasterror(); $error++; } @@ -1593,12 +1596,14 @@ class CommandeFournisseur extends CommonOrder if ($this->db->affected_rows($resql) < 1) { $this->error=$this->db->lasterror(); + $this->errors[]=$this->db->lasterror(); $error++; } } else { $this->error=$this->db->lasterror(); + $this->errors[]=$this->db->lasterror(); $error++; } @@ -1608,6 +1613,8 @@ class CommandeFournisseur extends CommonOrder $result=$this->deleteExtraFields(); if ($result < 0) { + $this->error='FailToDeleteExtraFields'; + $this->errors[]='FailToDeleteExtraFields'; $error++; dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } @@ -1615,7 +1622,11 @@ class CommandeFournisseur extends CommonOrder // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $this->error='FailToDeleteObjectLinked'; + $this->errors[]='FailToDeleteObjectLinked'; + $error++; + } if (! $error) { @@ -1630,6 +1641,7 @@ class CommandeFournisseur extends CommonOrder if (! dol_delete_file($file,0,0,0,$this)) // For triggers { $this->error='ErrorFailToDeleteFile'; + $this->errors[]='ErrorFailToDeleteFile'; $error++; } } @@ -1639,6 +1651,7 @@ class CommandeFournisseur extends CommonOrder if (! $res) { $this->error='ErrorFailToDeleteDir'; + $this->errors[]='ErrorFailToDeleteDir'; $error++; } } diff --git a/htdocs/langs/en_US/workflow.lang b/htdocs/langs/en_US/workflow.lang index 7414fcb7e62..14be1a6ade6 100644 --- a/htdocs/langs/en_US/workflow.lang +++ b/htdocs/langs/en_US/workflow.lang @@ -3,9 +3,9 @@ WorkflowSetup=Workflow module setup WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed -descWORKFLOW_PROPAL_AUTOCREATE_INVOICEAutomatically create a customer invoice after a commercial proposal is signed -descWORKFLOW_CONTRACT_AUTOCREATE_INVOICEAutomatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICEAutomatically create a customer invoice after a customer order is closed +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal to billed when customer order is set to paid descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated