mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Fix: works on repair broken features
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/admin/workflow.php
|
||||
* \ingroup company
|
||||
* \brief Workflows setup page
|
||||
* \version $Id: workflow.php,v 1.6 2011/08/08 16:00:18 eldy Exp $
|
||||
* \version $Id: workflow.php,v 1.7 2011/08/12 05:41:01 hregis Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -96,7 +96,7 @@ $workflowcodes=array();
|
||||
if ($conf->propal->enabled && $conf->commande->enabled) $workflowcodes['WORKFLOW_PROPAL_AUTOCREATE_ORDER']='WORKFLOW_PROPAL_AUTOCREATE_ORDER';
|
||||
//if ($conf->propal->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_PROPAL_AUTOCREATE_INVOICE']='WORKFLOW_PROPAL_AUTOCREATE_INVOICE';
|
||||
//if ($conf->contrat->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_CONTRACT_AUTOCREATE_INVOICE']='WORKFLOW_CONTRACT_AUTOCREATE_INVOICE';
|
||||
//if ($conf->commande->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_ORDER_AUTOCREATE_INVOICE']='WORKFLOW_ORDER_AUTOCREATE_INVOICE';
|
||||
if ($conf->commande->enabled && $conf->facture->enabled) $workflowcodes['WORKFLOW_ORDER_AUTOCREATE_INVOICE']='WORKFLOW_ORDER_AUTOCREATE_INVOICE';
|
||||
|
||||
if (sizeof($workflowcodes) > 0)
|
||||
{
|
||||
@@ -135,5 +135,5 @@ print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/08 16:00:18 $ - $Revision: 1.6 $');
|
||||
llxFooter('$Date: 2011/08/12 05:41:01 $ - $Revision: 1.7 $');
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* \file htdocs/commande/class/commande.class.php
|
||||
* \ingroup commande
|
||||
* \brief Fichier des classes de commandes
|
||||
* \version $Id: commande.class.php,v 1.124 2011/08/11 07:41:41 hregis Exp $
|
||||
* \version $Id: commande.class.php,v 1.125 2011/08/12 05:41:01 hregis Exp $
|
||||
*/
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
|
||||
@@ -453,7 +453,8 @@ class Commande extends CommonObject
|
||||
*/
|
||||
function cloture($user)
|
||||
{
|
||||
global $conf;
|
||||
global $conf, $langs;
|
||||
|
||||
$error=0;
|
||||
|
||||
if ($user->rights->commande->valider)
|
||||
@@ -855,10 +856,9 @@ class Commande extends CommonObject
|
||||
/**
|
||||
* Load an object from a proposal and create a new order into database
|
||||
* @param object Object source
|
||||
* @param invertdetail Reverse sign of amounts for lines
|
||||
* @return int <0 if KO, 0 if nothing done, 1 if OK
|
||||
*/
|
||||
function createFromProposal($object,$invertdetail=0,$hookmanager=false)
|
||||
function createFromProposal($object,$hookmanager=false)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* \file htdocs/commande/fiche.php
|
||||
* \ingroup commande
|
||||
* \brief Page to show customer order
|
||||
* \version $Id: fiche.php,v 1.534 2011/08/11 15:14:51 hregis Exp $
|
||||
* \version $Id: fiche.php,v 1.535 2011/08/12 05:41:02 hregis Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -1502,7 +1502,7 @@ else
|
||||
|
||||
if (! $formconfirm)
|
||||
{
|
||||
$parameters=array('lineid'=>$lienid);
|
||||
$parameters=array('lineid'=>$lineid);
|
||||
$formconfirm=$hookmanager->executeHooks('formconfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
|
||||
@@ -2070,5 +2070,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/11 15:14:51 $ - $Revision: 1.534 $');
|
||||
llxFooter('$Date: 2011/08/12 05:41:02 $ - $Revision: 1.535 $');
|
||||
?>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
* \file htdocs/compta/facture/class/facture.class.php
|
||||
* \ingroup facture
|
||||
* \brief Fichier de la classe des factures clients
|
||||
* \version $Id: facture.class.php,v 1.127 2011/08/11 15:14:50 hregis Exp $
|
||||
* \version $Id: facture.class.php,v 1.128 2011/08/12 05:41:01 hregis Exp $
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
@@ -635,6 +635,11 @@ class Facture extends CommonObject
|
||||
$line->special_code = $object->lines[$i]->special_code;
|
||||
$line->fk_parent_line = $object->lines[$i]->fk_parent_line;
|
||||
|
||||
// TODO it's ok ?
|
||||
$line->total_ht = $object->lines[$i]->total_ht;
|
||||
$line->total_tva = $object->lines[$i]->total_tva;
|
||||
$line->total_ttc = $object->lines[$i]->total_ttc;
|
||||
|
||||
$this->lines[$i] = $line;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/includes/triggers/interface_modWorkflow_WorkflowManager.class.php
|
||||
* \ingroup core
|
||||
* \brief Trigger file for workflows
|
||||
* \version $Id: interface_modWorkflow_WorkflowManager.class.php,v 1.9 2011/08/10 19:55:21 hregis Exp $
|
||||
* \version $Id: interface_modWorkflow_WorkflowManager.class.php,v 1.10 2011/08/12 05:41:01 hregis Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ class InterfaceWorkflowManager
|
||||
$hookmanager=new HookManager($this->db);
|
||||
$hookmanager->callHooks(array('ordercard'));
|
||||
|
||||
$ret=$order->createFromProposal($object,0,$hookmanager);
|
||||
$ret=$order->createFromProposal($object,$hookmanager);
|
||||
if ($ret < 0) { $this->error=$invoice->error; $this->errors[]=$invoice->error; }
|
||||
return $ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user