Merge remote-tracking branch 'uptream/6.0' into 6.0-d1
This commit is contained in:
commit
95672e3bf0
@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
global $user;
|
global $user;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$object = new Accountingbookkeeping($this->db);
|
$object = new BookKeeping($this->db);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
@ -401,7 +401,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$bookkeeping->numero_compte = $k;
|
$bookkeeping->numero_compte = $k;
|
||||||
$bookkeeping->label_operation = $val["label"];
|
$bookkeeping->label_operation = $val["label"];
|
||||||
$bookkeeping->label_compte = $langs->trans("Bank");
|
$bookkeeping->label_compte = $langs->trans("Bank");
|
||||||
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
|
||||||
$bookkeeping->debit = ($mt >= 0 ? $mt : 0);
|
$bookkeeping->debit = ($mt >= 0 ? $mt : 0);
|
||||||
$bookkeeping->credit = ($mt < 0 ? - $mt : 0);
|
$bookkeeping->credit = ($mt < 0 ? - $mt : 0);
|
||||||
@ -462,7 +462,7 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
$bookkeeping->fk_doc = $key;
|
$bookkeeping->fk_doc = $key;
|
||||||
$bookkeeping->fk_docdet = $val["fk_bank"];
|
$bookkeeping->fk_docdet = $val["fk_bank"];
|
||||||
$bookkeeping->label_operation = $tabcompany[$key]['name'];
|
$bookkeeping->label_operation = $tabcompany[$key]['name'];
|
||||||
$bookkeeping->montant = ($mt < 0 ? - $mt : $mt);
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
|
||||||
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
|
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
|
||||||
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
|
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
|
||||||
|
|||||||
@ -203,7 +203,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
$bookkeeping->label_operation = $tabuser[$key]['name'];
|
$bookkeeping->label_operation = $tabuser[$key]['name'];
|
||||||
$bookkeeping->montant = $mt;
|
$bookkeeping->montant = $mt;
|
||||||
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
|
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
|
||||||
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
|
$bookkeeping->debit = ($mt <= 0) ? -$mt : 0;
|
||||||
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
|
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
|
||||||
$bookkeeping->code_journal = $journal;
|
$bookkeeping->code_journal = $journal;
|
||||||
$bookkeeping->journal_label = $journal_label;
|
$bookkeeping->journal_label = $journal_label;
|
||||||
|
|||||||
@ -1750,6 +1750,7 @@ if ($action == 'create')
|
|||||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->propal->creer, 'string', '', null, null, '', 1);
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->propal->creer, 'string', '', null, null, '', 1);
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' (<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$object->thirdparty->id.'">'.$langs->trans("OtherProposals").'</a>)';
|
||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1924,6 +1924,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
|||||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1);
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->commande->creer, 'string', '', null, null, '', 1);
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $soc->getNomUrl(1);
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' (<a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->thirdparty->id.'">'.$langs->trans("OtherOrders").'</a>)';
|
||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -236,7 +236,7 @@ class BankAccounts extends DolibarrApi
|
|||||||
function _validate($data)
|
function _validate($data)
|
||||||
{
|
{
|
||||||
$account = array();
|
$account = array();
|
||||||
foreach (Accounts::$FIELDS as $field) {
|
foreach (BankAccounts::$FIELDS as $field) {
|
||||||
if (! isset($data[$field]))
|
if (! isset($data[$field]))
|
||||||
throw new RestException(400, "$field field missing");
|
throw new RestException(400, "$field field missing");
|
||||||
$account[$field] = $data[$field];
|
$account[$field] = $data[$field];
|
||||||
|
|||||||
@ -3075,6 +3075,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1);
|
$morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->facture->creer, 'string', '', null, null, '', 1);
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref.=' (<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->thirdparty->id.'">'.$langs->trans("OtherBills").'</a>)';
|
||||||
// Project
|
// Project
|
||||||
if (! empty($conf->projet->enabled))
|
if (! empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1311,7 +1311,7 @@ else
|
|||||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||||
print $langs->trans('RIB');
|
print $langs->trans('RIB');
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
|
if (($action != 'editbankaccount') && $user->rights->facture->creer && ! empty($object->brouillon))
|
||||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
|
|||||||
@ -332,7 +332,7 @@ if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights-
|
|||||||
$moreforfilter.='<div class="divsearchfield">';
|
$moreforfilter.='<div class="divsearchfield">';
|
||||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||||
$moreforfilter.='</div>';
|
$moreforfilter.='</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,7 +523,6 @@ while ($i < min($num,$limit))
|
|||||||
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;
|
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
|
|||||||
@ -350,7 +350,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
$sql = "SELECT rowid, ref, ref_ext";
|
$sql = "SELECT rowid, ref, ref_ext";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
|
$sql.= " FROM ".MAIN_DB_PREFIX.$element;
|
||||||
$sql.= " WHERE entity IN (".getEntity($element, true).")" ;
|
$sql.= " WHERE entity IN (".getEntity($element).")" ;
|
||||||
|
|
||||||
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
|
if ($id > 0) $sql.= " AND rowid = ".$db->escape($id);
|
||||||
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
|
else if ($ref) $sql.= " AND ref = '".$db->escape($ref)."'";
|
||||||
@ -3947,7 +3947,7 @@ abstract class CommonObject
|
|||||||
|
|
||||||
// Now we add first model found in directories scanned
|
// Now we add first model found in directories scanned
|
||||||
$listofdir=explode(',',$dirtoscan);
|
$listofdir=explode(',',$dirtoscan);
|
||||||
foreach($listofdir as $key=>$tmpdir)
|
foreach($listofdir as $key => $tmpdir)
|
||||||
{
|
{
|
||||||
$tmpdir=trim($tmpdir);
|
$tmpdir=trim($tmpdir);
|
||||||
$tmpdir=preg_replace('/DOL_DATA_ROOT/',DOL_DATA_ROOT,$tmpdir);
|
$tmpdir=preg_replace('/DOL_DATA_ROOT/',DOL_DATA_ROOT,$tmpdir);
|
||||||
|
|||||||
@ -1482,10 +1482,10 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
|||||||
$sql.= " VALUES (";
|
$sql.= " VALUES (";
|
||||||
$sql.= $this->db->encrypt($this->const_name."_TABS_".$i,1);
|
$sql.= $this->db->encrypt($this->const_name."_TABS_".$i,1);
|
||||||
$sql.= ", 'chaine'";
|
$sql.= ", 'chaine'";
|
||||||
$sql.= ", ".$this->db->encrypt($value,1);
|
$sql.= ", ".$this->db->encrypt($newvalue,1);
|
||||||
$sql.= ", null";
|
$sql.= ", null";
|
||||||
$sql.= ", '0'";
|
$sql.= ", '0'";
|
||||||
$sql.= ", ".$conf->entity;
|
$sql.= ", ".$entity;
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG);
|
dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG);
|
||||||
|
|||||||
@ -211,7 +211,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
if (! is_object($object))
|
if (! is_object($object))
|
||||||
{
|
{
|
||||||
$id = $object;
|
$id = $object;
|
||||||
$object = new Contract($this->db);
|
$object = new Contrat($this->db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1576,7 +1576,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if ($object->statut == Facture::STATUS_DRAFT)
|
if ($object->statut == Facture::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
$pdf->SetTextColor(128,0,0);
|
$pdf->SetTextColor(128,0,0);
|
||||||
$textref.=' - '.$outputlangs->trans("NotValidated");
|
$textref.=' - '.$outputlangs->transnoentities("NotValidated");
|
||||||
}
|
}
|
||||||
$pdf->MultiCell($w, 4, $textref, '', 'R');
|
$pdf->MultiCell($w, 4, $textref, '', 'R');
|
||||||
|
|
||||||
@ -1663,7 +1663,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$posy+=4;
|
$posy+=4;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell($w, 3, $langs->trans("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
$pdf->MultiCell($w, 3, $langs->transnoentities("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -252,7 +252,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
if (! is_object($object))
|
if (! is_object($object))
|
||||||
{
|
{
|
||||||
$id = $object;
|
$id = $object;
|
||||||
$object = new Propale($this->db);
|
$object = new Propal($this->db);
|
||||||
$result=$object->fetch($id);
|
$result=$object->fetch($id);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -492,7 +492,7 @@ if ($resql)
|
|||||||
|
|
||||||
if (! GETPOST('cancel'))
|
if (! GETPOST('cancel'))
|
||||||
{
|
{
|
||||||
$objecttmp=new FactureFourn($db);
|
$objecttmp=new FactureFournisseur($db);
|
||||||
$listofselectedid=array();
|
$listofselectedid=array();
|
||||||
$listofselectedthirdparties=array();
|
$listofselectedthirdparties=array();
|
||||||
$listofselectedref=array();
|
$listofselectedref=array();
|
||||||
|
|||||||
@ -448,7 +448,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Number of supplier invoices (has paid)
|
// Number of supplier invoices (has paid)
|
||||||
if (! empty($conf->supplier_invoice->enabled) && ! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
if (! empty($conf->supplier_invoice->enabled) && ! empty($user->rights->fournisseur->facture->lire))
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
$board=new FactureFournisseur($db);
|
$board=new FactureFournisseur($db);
|
||||||
|
|||||||
@ -611,3 +611,7 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (14
|
|||||||
-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT;
|
-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT;
|
||||||
|
|
||||||
ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50);
|
ALTER TABLE llx_import_model MODIFY COLUMN type varchar(50);
|
||||||
|
|
||||||
|
-- Negative buying prices
|
||||||
|
|
||||||
|
UPDATE llx_facturedet SET buy_price_ht = ABS(buy_price_ht)
|
||||||
|
|||||||
@ -117,6 +117,7 @@ SecondApprovalAlreadyDone=Second approval already done
|
|||||||
SupplierOrderReceivedInDolibarr=Supplier order %s received %s
|
SupplierOrderReceivedInDolibarr=Supplier order %s received %s
|
||||||
SupplierOrderSubmitedInDolibarr=Supplier order %s submited
|
SupplierOrderSubmitedInDolibarr=Supplier order %s submited
|
||||||
SupplierOrderClassifiedBilled=Supplier order %s set billed
|
SupplierOrderClassifiedBilled=Supplier order %s set billed
|
||||||
|
OtherOrders=Other orders
|
||||||
##### Types de contacts #####
|
##### Types de contacts #####
|
||||||
TypeContact_commande_internal_SALESREPFOLL=Representative following-up customer order
|
TypeContact_commande_internal_SALESREPFOLL=Representative following-up customer order
|
||||||
TypeContact_commande_internal_SHIPPING=Representative following-up shipping
|
TypeContact_commande_internal_SHIPPING=Representative following-up shipping
|
||||||
|
|||||||
@ -63,6 +63,7 @@ ProposalLine=Proposal line
|
|||||||
AvailabilityPeriod=Availability delay
|
AvailabilityPeriod=Availability delay
|
||||||
SetAvailability=Set availability delay
|
SetAvailability=Set availability delay
|
||||||
AfterOrder=after order
|
AfterOrder=after order
|
||||||
|
OtherProposals=Other proposals
|
||||||
##### Availability #####
|
##### Availability #####
|
||||||
AvailabilityTypeAV_NOW=Immediate
|
AvailabilityTypeAV_NOW=Immediate
|
||||||
AvailabilityTypeAV_1W=1 week
|
AvailabilityTypeAV_1W=1 week
|
||||||
|
|||||||
@ -69,6 +69,7 @@ NoPredefinedProductToDispatch=No predefined products for this object. So no disp
|
|||||||
DispatchVerb=Dispatch
|
DispatchVerb=Dispatch
|
||||||
StockLimitShort=Limit for alert
|
StockLimitShort=Limit for alert
|
||||||
StockLimit=Stock limit for alert
|
StockLimit=Stock limit for alert
|
||||||
|
StockLimitDesc="" (empty) default value means no alert. <br>"0" can be used with 'Stock can be negative' configuration.
|
||||||
PhysicalStock=Physical stock
|
PhysicalStock=Physical stock
|
||||||
RealStock=Real Stock
|
RealStock=Real Stock
|
||||||
RealStockDesc=Physical or real stock is the stock you currently have into your internal warehouses/emplacements.
|
RealStockDesc=Physical or real stock is the stock you currently have into your internal warehouses/emplacements.
|
||||||
|
|||||||
@ -129,6 +129,8 @@ class modMyModule extends DolibarrModules
|
|||||||
// Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1
|
// Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1
|
||||||
// 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
|
// 'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
|
||||||
// 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
|
// 'objecttype:-tabname:NU:conditiontoremove'); // To remove an existing tab identified by code tabname
|
||||||
|
// Can also be: $this->tabs = array('data'=>'...', 'entity'=>0);
|
||||||
|
//
|
||||||
// where objecttype can be
|
// where objecttype can be
|
||||||
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
|
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
|
||||||
// 'contact' to add a tab in contact view
|
// 'contact' to add a tab in contact view
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user