mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -56,6 +56,8 @@ For developers:
|
||||
- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete
|
||||
- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE.
|
||||
- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE.
|
||||
- New: Added hook "formConfirm" and "doActions" for supplier invoice card
|
||||
- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card
|
||||
|
||||
WARNING: Following change may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
|
||||
@@ -481,7 +481,7 @@ if ($action == 'add')
|
||||
}
|
||||
|
||||
// Action update description of emailing
|
||||
if ($action == 'settitre' || $action == 'setemail_from' || $actino == 'setreplyto' || $action == 'setemail_errorsto')
|
||||
if ($action == 'settitre' || $action == 'setemail_from' || $action == 'setreplyto' || $action == 'setemail_errorsto')
|
||||
{
|
||||
$upload_dir = $conf->mailing->dir_output . "/" . get_exdir($object->id,2,0,1);
|
||||
|
||||
|
||||
@@ -2512,7 +2512,7 @@ class Form
|
||||
require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php';
|
||||
$bankstatic=new Account($this->db);
|
||||
$bankstatic->fetch($selected);
|
||||
print $bankstatic->label.' ('.$bankstatic->currency_code.')';
|
||||
print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code);
|
||||
} else {
|
||||
print " ";
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -85,6 +86,9 @@ $permissionnote=$user->rights->fournisseur->facture->creer; // Used by the inclu
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
||||
|
||||
// Action clone object
|
||||
@@ -1476,7 +1480,7 @@ else
|
||||
// Confirmation de la suppression d'une ligne produit
|
||||
if ($action == 'confirm_delete_line')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
@@ -1488,7 +1492,7 @@ else
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1);
|
||||
}
|
||||
|
||||
// Confirmation de la validation
|
||||
@@ -1544,24 +1548,32 @@ else
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
}
|
||||
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation set paid
|
||||
if ($action == 'paid')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation de la suppression de la facture fournisseur
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
if (!$formconfirm) {
|
||||
$parameters=array('lineid'=>$lineid);
|
||||
$formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
|
||||
/**
|
||||
* Invoice
|
||||
|
||||
@@ -52,6 +52,9 @@ $object = new Fournisseur($db);
|
||||
* Action
|
||||
*/
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if ($action == 'setsupplieraccountancycode')
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
|
||||
@@ -672,6 +672,8 @@ HelpCopyToClipboard=Use Ctrl+C to copy to clipboard
|
||||
SaveUploadedFileWithMask=Save file on server with name "<strong>%s</strong>" (otherwise "%s")
|
||||
OriginFileName=Original filename
|
||||
SetDemandReason=Set source
|
||||
SetBankAccount=Define Bank Account
|
||||
AccountCurrency=Account Currency
|
||||
ViewPrivateNote=View notes
|
||||
XMoreLines=%s line(s) hidden
|
||||
PublicUrl=Public URL
|
||||
|
||||
@@ -672,6 +672,8 @@ HelpCopyToClipboard=Utilisez Ctrl+C pour copier dans le presse-papier
|
||||
SaveUploadedFileWithMask=Sauver le fichier sur le serveur sous le nom "<strong>%s</strong>" (sinon "%s")
|
||||
OriginFileName=nom du fichier source
|
||||
SetDemandReason=Définir la source
|
||||
SetBankAccount=Définir le compte bancaire
|
||||
AccountCurrency=Devise du compte
|
||||
ViewPrivateNote=Voir les notes
|
||||
XMoreLines=%s ligne(s) cachées
|
||||
PublicUrl=URL publique
|
||||
|
||||
@@ -471,6 +471,11 @@ function createThirdParty($authentication,$thirdparty)
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
// Patch to add capability to associate (one) sale representative
|
||||
if($thirdparty['commid'] && $thirdparty['commid']>0)
|
||||
$newobject->add_commercial($fuser, $thirdparty["commid"]);
|
||||
|
||||
$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user