Merge remote-tracking branch 'origin/3.8' into develop
Conflicts: htdocs/compta/facture/list.php htdocs/core/class/html.form.class.php htdocs/core/lib/functions.lib.php htdocs/filefunc.inc.php htdocs/fourn/facture/list.php htdocs/main.inc.php
This commit is contained in:
commit
1f1e72f2b6
@ -2181,7 +2181,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 '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=classifybilled&socid=' . $object->socid . '">' . $langs->trans("ClassifyBilled") . '</a></div>';
|
||||
}
|
||||
|
||||
@ -1870,7 +1870,7 @@ if ($action == 'create')
|
||||
$objectsrc->fetch_lines();
|
||||
$objectsrc->fetch_thirdparty();
|
||||
|
||||
$projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : '');
|
||||
$projectid = (! empty($projectid) ? $projectid : $objectsrc->fk_project);
|
||||
$ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
|
||||
$ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
|
||||
|
||||
@ -2250,9 +2250,6 @@ if ($action == 'create')
|
||||
// Project
|
||||
if (! empty($conf->projet->enabled) && $socid > 0)
|
||||
{
|
||||
$projectid = GETPOST('projectid')?GETPOST('projectid'):0;
|
||||
if ($origin == 'project') $projectid = ($originid ? $originid : 0);
|
||||
|
||||
$langs->load('projects');
|
||||
print '<tr><td>' . $langs->trans('Project') . '</td><td colspan="2">';
|
||||
$numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0);
|
||||
|
||||
@ -281,7 +281,7 @@ if ($resql)
|
||||
if ($search_user > 0) $param.='&search_user=' .$search_user;
|
||||
if ($search_montant_ht != '') $param.='&search_montant_ht='.$search_montant_ht;
|
||||
if ($search_montant_ttc != '') $param.='&search_montant_ttc='.$search_montant_ttc;
|
||||
if ($search_status > 0) $param.='&search_status='.$search_status;
|
||||
if ($search_status != '') $param.='&search_status='.$search_status;
|
||||
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy.png');
|
||||
|
||||
$i = 0;
|
||||
|
||||
@ -417,6 +417,7 @@ $search_societe = GETPOST("search_societe");
|
||||
$search_paymentmode = GETPOST("search_paymentmode");
|
||||
$search_montant_ht = GETPOST("search_montant_ht");
|
||||
$search_montant_ttc = GETPOST("search_montant_ttc");
|
||||
$search_status = GETPOST("search_status");
|
||||
$late = GETPOST("late");
|
||||
|
||||
// Do we click on purge search criteria ?
|
||||
@ -428,6 +429,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
||||
$search_paymentmode='';
|
||||
$search_montant_ht='';
|
||||
$search_montant_ttc='';
|
||||
$search_status='';
|
||||
}
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
@ -483,6 +485,7 @@ if ($search_paymentmode) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmo
|
||||
if ($search_montant_ht) $sql .= " AND f.total = '".$db->escape($search_montant_ht)."'";
|
||||
if ($search_montant_ttc) $sql .= " AND f.total_ttc = '".$db->escape($search_montant_ttc)."'";
|
||||
if (GETPOST('sf_ref')) $sql .= " AND f.facnumber LIKE '%".$db->escape(GETPOST('sf_ref'))."%'";
|
||||
if ($search_status) $sql .= " AND f.fk_statut = ".$search_status;
|
||||
if ($month > 0)
|
||||
{
|
||||
if ($year > 0)
|
||||
@ -528,6 +531,7 @@ if ($resql)
|
||||
if ($search_societe) $param.='&search_paymentmode='.urlencode($search_paymentmode);
|
||||
if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht);
|
||||
if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc);
|
||||
if ($search_status) $param.='&search_status='.urlencode($search_status);
|
||||
if ($late) $param.='&late='.urlencode($late);
|
||||
if ($mode) $param.='&mode='.urlencode($mode);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||
|
||||
@ -388,11 +388,16 @@ abstract class CommonDocGenerator
|
||||
// Add vat by rates
|
||||
foreach ($object->lines as $line)
|
||||
{
|
||||
// $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward comaptibility
|
||||
if (empty($resarray[$array_key.'_total_vat_'.$line->tva_tx])) $resarray[$array_key.'_total_vat_'.$line->tva_tx]=0;
|
||||
$resarray[$array_key.'_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
||||
$resarray[$array_key.'_total_vat_locale_'.$line->tva_tx]=price($resarray[$array_key.'_total_vat_'.$line->tva_tx]);
|
||||
// $vatformated is vat without not expected chars (so 20, or 8.5 or 5.99 for example)
|
||||
$vatformated=vatrate($line->tva_tx);
|
||||
if (empty($resarray[$array_key.'_total_vat_'.$vatformated])) $resarray[$array_key.'_total_vat_'.$vatformated]=0;
|
||||
$resarray[$array_key.'_total_vat_'.$vatformated]+=$line->total_tva;
|
||||
$resarray[$array_key.'_total_vat_locale_'.$vatformated]=price($resarray[$array_key.'_total_vat_'.$vatformated]);
|
||||
}
|
||||
|
||||
// Retrieve extrafields
|
||||
if (is_array($object->array_options) && count($object->array_options))
|
||||
{
|
||||
|
||||
@ -5223,7 +5223,6 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0)
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the filename of file to get the thumbs
|
||||
*
|
||||
|
||||
@ -91,7 +91,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest=
|
||||
if (! $passok)
|
||||
{
|
||||
if ((! $passcrypted || $passtyped)
|
||||
&& ($passtyped == $passclear))
|
||||
&& ($passclear && ($passtyped == $passclear)))
|
||||
{
|
||||
$passok=true;
|
||||
dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found pass in database");
|
||||
|
||||
@ -1575,6 +1575,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;
|
||||
}
|
||||
@ -1587,6 +1588,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++;
|
||||
}
|
||||
|
||||
@ -1597,12 +1600,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++;
|
||||
}
|
||||
|
||||
@ -1612,6 +1617,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);
|
||||
}
|
||||
@ -1619,7 +1626,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)
|
||||
{
|
||||
@ -1634,6 +1645,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
if (! dol_delete_file($file,0,0,0,$this)) // For triggers
|
||||
{
|
||||
$this->error='ErrorFailToDeleteFile';
|
||||
$this->errors[]='ErrorFailToDeleteFile';
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
@ -1643,6 +1655,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
if (! $res)
|
||||
{
|
||||
$this->error='ErrorFailToDeleteDir';
|
||||
$this->errors[]='ErrorFailToDeleteDir';
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,9 +94,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
||||
$search_company="";
|
||||
$search_amount_no_tax="";
|
||||
$search_amount_all_tax="";
|
||||
$search_status="";
|
||||
$year="";
|
||||
$month="";
|
||||
$filter="";
|
||||
}
|
||||
|
||||
// List of fields to search into when doing a "search in all"
|
||||
@ -162,15 +162,6 @@ if ($socid)
|
||||
{
|
||||
$sql .= " AND s.rowid = ".$socid;
|
||||
}
|
||||
if ($filter && $filter != -1) // GETPOST('filtre') may be a string
|
||||
{
|
||||
$filtrearr = explode(",", $filter);
|
||||
foreach ($filtrearr as $fil)
|
||||
{
|
||||
$filt = explode(":", $fil);
|
||||
$sql .= " AND " . $filt[0] . " = " . $filt[1];
|
||||
}
|
||||
}
|
||||
if ($search_all)
|
||||
{
|
||||
$sql.= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||
@ -232,7 +223,7 @@ if ($search_amount_all_tax != '')
|
||||
|
||||
if ($search_status != '')
|
||||
{
|
||||
$sql.= " AND fac.fk_statut = '".$db->escape($search_status)."'";
|
||||
$sql.= " AND fac.fk_statut = ".$search_status;
|
||||
}
|
||||
|
||||
$nbtotalofrecords = 0;
|
||||
@ -268,6 +259,7 @@ if ($resql)
|
||||
if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax);
|
||||
if ($filter && $filter != -1) $param.='&filtre='.urlencode($filter);
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
if ($search_status >= 0) $param.="&search_status=".$search_status;
|
||||
|
||||
print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
@ -337,8 +329,8 @@ if ($resql)
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="6" name="search_amount_all_tax" value="'.$search_amount_all_tax.'">';
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
$liststatus=array('fac.fk_statut:0'=>$langs->trans("Draft"),'fac.fk_statut:1,paye:0'=>$langs->trans("Unpaid"), 'paye:1'=>$langs->trans("Paid"));
|
||||
print $form->selectarray('filtre', $liststatus, $filter, 1);
|
||||
$liststatus=array('0'=>$langs->trans("Draft"),'1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid"));
|
||||
print $form->selectarray('filtre', $liststatus, $search_status, 1);
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
|
||||
Binary file not shown.
@ -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
|
||||
|
||||
@ -1488,7 +1488,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
// Login name with photo and tooltip
|
||||
$mode=-1;
|
||||
$toprightmenu.='<div class="inline-block nowrap"><div class="inline-block login_block_elem login_block_elem_name" style="padding: 0px;">';
|
||||
$toprightmenu.=$user->getNomurl($mode, '', true, 0, 11, 0, ($user->firstname ? 'firstname' : -1),'atoplogin');
|
||||
$toprightmenu.=$user->getNomUrl($mode, '', true, 0, 11, 0, ($user->firstname ? 'firstname' : -1),'atoplogin');
|
||||
$toprightmenu.='</div></div>';
|
||||
|
||||
$toprightmenu.='</div>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user