Merge remote-tracking branch 'origin/3.8' into develop

Conflicts:
	htdocs/.gitignore
	htdocs/categories/edit.php
This commit is contained in:
Laurent Destailleur 2015-09-23 00:34:57 +02:00
commit f81df66564
11 changed files with 61 additions and 45 deletions

View File

@ -15,7 +15,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
# Require all granted
# </IfVersion>
# <IfVersion < 2.3>
# Order allow, deny
# Order allow,deny
# Allow from all
# </IfVersion>
#
@ -27,7 +27,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order allow, deny
Order allow,deny
Allow from all
</IfVersion>

7
htdocs/.gitignore vendored
View File

@ -1,7 +1,11 @@
/allscreens*
/ancot*
/bootstrap*
/dolimed*
/ecommerce*
/extensions*
/google*
/lead
/multicompany*
/ndf*
/numberingpack*
@ -11,6 +15,3 @@
/teclib*
/test.php
/ultimatepdf*
/lead
/dolimed*
/allscreens*

View File

@ -86,21 +86,15 @@ if ($action == 'update' && $user->rights->categorie->creer)
if (empty($categorie->label))
{
$error++;
$action = 'create';
$action = 'edit';
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors');
}
if (empty($categorie->description))
{
$error++;
$action = 'create';
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Description")), 'errors');
}
if (! $error && empty($categorie->error))
{
$ret = $extrafields->setOptionalsFromPost($extralabels,$categorie);
if ($ret < 0) $error++;
if ($categorie->update($user) > 0)
if (! $error && $categorie->update($user) > 0)
{
header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$categorie->id.'&type='.$type);
exit;
@ -151,7 +145,7 @@ print '</tr>';
// Description
print '<tr>';
print '<td class="fieldrequired">'.$langs->trans("Description").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td >';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_notes','',false,true,$conf->fckeditor->enabled,ROWS_6,50);

View File

@ -965,25 +965,25 @@ if ($id > 0)
print '<div class="tabsAction">';
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
if (! empty($conf->propal->enabled) && $user->rights->propal->creer && $object->status==1)
{
$langs->load("propal");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/comm/propal.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddProp").'</a></div>';
}
if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
if (! empty($conf->commande->enabled) && $user->rights->commande->creer && $object->status==1)
{
$langs->load("orders");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddOrder").'</a></div>';
}
if ($user->rights->contrat->creer)
if ($user->rights->contrat->creer && $object->status==1)
{
$langs->load("contracts");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddContract").'</a></div>';
}
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer && $object->status==1)
{
$langs->load("fichinter");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddIntervention").'</a></div>';
@ -992,7 +992,7 @@ if ($id > 0)
// Add invoice
if ($user->societe_id == 0)
{
if (! empty($conf->deplacement->enabled))
if (! empty($conf->deplacement->enabled) && $object->status==1)
{
$langs->load("trips");
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/card.php?socid='.$object->id.'&amp;action=create">'.$langs->trans("AddTrip").'</a></div>';
@ -1000,7 +1000,7 @@ if ($id > 0)
if (! empty($conf->facture->enabled))
{
if ($user->rights->facture->creer)
if ($user->rights->facture->creer && $object->status==1)
{
$langs->load("bills");
$langs->load("orders");

View File

@ -195,22 +195,18 @@ if (empty($reshook))
{
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{
// Define output language
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
{
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
if (! empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model=$object->modelpdf;
$ret = $object->fetch($id); // Reload to get new records
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang;
if (! empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model=$object->modelpdf;
$ret = $object->fetch($id); // Reload to get new records
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
}
} else {
$langs->load("errors");
@ -1290,7 +1286,7 @@ if ($action == 'create')
print '</td>';
} else {
print '<td colspan="2">';
print $form->select_company('', 'socid', 's.client = 1 OR s.client = 2 OR s.client = 3', 1);
print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1);
print '</td>';
}
print '</tr>' . "\n";

View File

@ -628,8 +628,14 @@ class DolibarrModules // Can not be abstract, because we need to insta
{
$dirfound++;
// Run llx_mytable.sql files
// Run llx_mytable.sql files, then llx_mytable_*.sql
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data')
{
@ -640,8 +646,14 @@ class DolibarrModules // Can not be abstract, because we need to insta
rewinddir($handle);
// Run llx_mytable.key.sql files (Must be done after llx_mytable.sql)
// Run llx_mytable.key.sql files (Must be done after llx_mytable.sql) then then llx_mytable_*.key.sql
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'llx_' && substr($file,0,4) != 'data')
{
@ -653,7 +665,13 @@ class DolibarrModules // Can not be abstract, because we need to insta
rewinddir($handle);
// Run data_xxx.sql files (Must be done after llx_mytable.key.sql)
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,4) == 'data')
{
@ -665,7 +683,13 @@ class DolibarrModules // Can not be abstract, because we need to insta
rewinddir($handle);
// Run update_xxx.sql files
$files = array();
while (($file = readdir($handle))!==false)
{
$files[] = $file;
}
sort($files);
foreach ($files as $file)
{
if (preg_match('/\.sql$/i',$file) && ! preg_match('/\.key\.sql$/i',$file) && substr($file,0,6) == 'update')
{

View File

@ -164,7 +164,7 @@ class modBanque extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='Bordereaux remise Chq/Fact';
$this->export_permission[$r]=array(array("banque","export"));
$this->export_fields_array[$r]=array("bch.rowid"=>"bordereauid","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation",
$this->export_fields_array[$r]=array("bch.rowid"=>"DepositId","bch.number"=>"Numero","bch.ref_ext"=>"RefExt",'ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation",
"bch.date_bordereau"=>"Date","bch.amount"=>"Total","bch.nbcheque"=>"NbCheque","bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","f.facnumber"=>"InvoiceRef"
);
$this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Numeric','b.num_releve'=>'Text','b.datec'=>"Date",

View File

@ -51,7 +51,7 @@ $(document).ready(function() {
$('#refreshbutton').click( function() {
$.pleaseBePatient("<?php echo $langs->trans('PleaseBePatient'); ?>");
$.getJSON( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
$.get( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
action: "build",
element: "ecm"
},

View File

@ -5,11 +5,8 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
<<<<<<< HEAD
* Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com>
=======
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
>>>>>>> refs/remotes/origin/3.6
*
* 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
@ -46,6 +43,7 @@ $confirm = GETPOST('confirm');
$facid=GETPOST('facid','int');
$socid=GETPOST('socid','int');
$accountid = GETPOST('accountid');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@ -200,7 +198,7 @@ if (empty($reshook))
if (! $error)
{
$result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$_POST['accountid'],'','');
$result=$paiement->addPaymentToBank($user,'payment_supplier','(SupplierInvoicePayment)',$accountid,'','');
if ($result < 0)
{
setEventMessage($paiement->error, 'errors');
@ -304,7 +302,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (! empty($conf->banque->enabled))
{
print '<tr><td class="fieldrequired">'.$langs->trans('Account').'</td><td>';
$form->select_comptes(empty($_POST['accountid'])?'':$_POST['accountid'],'accountid',0,'',2);
$form->select_comptes(empty($accountid)?'':$accountid,'accountid',0,'',2);
print '</td></tr>';
}
else

View File

@ -382,6 +382,8 @@ ChequesReceipts=Checks receipts
ChequesArea=Checks deposits area
ChequeDeposits=Checks deposits
Cheques=Checks
DepositId=Id deposit
NbCheque=Number of checks
CreditNoteConvertedIntoDiscount=This credit note or deposit invoice has been converted into %s
UsBillingContactAsIncoiveRecipientIfExist=Use customer billing contact address instead of third party address as recipient for invoices
ShowUnpaidAll=Show all unpaid invoices

View File

@ -1,3 +1,4 @@
/bootstrap
/oblyon
/autre
/allscreens