Merge branch 'develop' of github.com:Dolibarr/dolibarr into dev_fix_createcontactmailmandatory
This commit is contained in:
commit
0aa2de230e
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,6 +16,7 @@ default.properties
|
||||
.DS_Store
|
||||
.idea
|
||||
*.iml
|
||||
*.orig
|
||||
Thumbs.db
|
||||
/dolibarr_genesis.mp4
|
||||
# Log files
|
||||
|
||||
@ -96,9 +96,6 @@ NEW: common behavior for monthly leave list view
|
||||
NEW: convert all subscription in datetime
|
||||
NEW: date shipment from order accepts hours
|
||||
NEW: price level compatibility for variant
|
||||
NEW: delayed payment in TakePOS
|
||||
NEW: display date range if exist in TakePOS
|
||||
NEW: display resiliate status in TakePOS for member
|
||||
NEW: display stat for BOM on "object referent"/linked Object product tab
|
||||
NEW: Email configuration - allow auto signed certificate when smtp ssl activated
|
||||
NEW: enable free emails input with select2
|
||||
@ -156,6 +153,9 @@ NEW: TakePOS add third order printer
|
||||
NEW: TakePOS can change thirdparty with barcode scan
|
||||
NEW: TakePOS can create a thirdparty customer from TakePOS frontend
|
||||
NEW: TakePOS connector compatibility with RECEIPT PRINTERS module
|
||||
NEW: TakePOS add delayed payment
|
||||
NEW: TakePOS display date range if exist
|
||||
NEW: TakePOS display resiliate status for members
|
||||
NEW: TakePOS Gift Receipt
|
||||
NEW: TakePOS multicurrency compatibility
|
||||
NEW: TakePOS multicurrency total
|
||||
@ -250,6 +250,7 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Function showStripePaymentUrl, getStripePaymentUrl, showPaypalPaymentUrl and getPaypalPaymentUrl has been removed. The generic one showOnlinePaymentUrl and getOnlinePaymentUrl are always used.
|
||||
* Context for hook showSocinfoOnPrint has been moved from "showsocinfoonprint" to "main"
|
||||
* Library htdocs/includes/phpoffice/phpexcel as been removed (replaced with htdocs/includes/phpoffice/PhpSpreadsheet)
|
||||
* Databse transaction in your triggers must be correctly balanced (one close for one open). If not, an error will be returned by the trigger, even if trigger did return error code.
|
||||
|
||||
|
||||
***** ChangeLog for 12.0.4 compared to 12.0.3 *****
|
||||
|
||||
@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) { dol_print_error('', $user->error); exit; }
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
|
||||
@ -82,12 +85,12 @@ $obj->lines[]=$line1;
|
||||
|
||||
// Create invoice
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0)
|
||||
{
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result=$obj->validate($user);
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else {
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
@ -99,8 +102,7 @@ if ($idobject > 0)
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) { dol_print_error('', $user->error); exit; }
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
|
||||
@ -80,12 +83,12 @@ $com->lines[]=$orderline1;
|
||||
|
||||
// Create order
|
||||
$idobject=$com->create($user);
|
||||
if ($idobject > 0)
|
||||
{
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result=$com->valid($user);
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else {
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
$error++;
|
||||
dol_print_error($db, $com->error);
|
||||
}
|
||||
@ -97,8 +100,7 @@ if ($idobject > 0)
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) { dol_print_error('', $user->error); exit; }
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
|
||||
@ -79,8 +82,7 @@ $myproduct->weight_units = 0;
|
||||
|
||||
// Create product in database
|
||||
$idobject = $myproduct->create($user);
|
||||
if ($idobject > 0)
|
||||
{
|
||||
if ($idobject > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
$error++;
|
||||
@ -89,8 +91,7 @@ if ($idobject > 0)
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@ -49,7 +49,10 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) { dol_print_error('', $user->error); exit; }
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
|
||||
@ -69,18 +72,17 @@ $obj->nom = 'ABCDEF';
|
||||
|
||||
// Create user
|
||||
$idobject=$obj->create($user);
|
||||
if ($idobject > 0)
|
||||
{
|
||||
if ($idobject > 0) {
|
||||
// Change status to validated
|
||||
$result=$obj->setStatut(1);
|
||||
if ($result > 0) print "OK Object created with id ".$idobject."\n";
|
||||
else {
|
||||
if ($result > 0) {
|
||||
print "OK Object created with id ".$idobject."\n";
|
||||
} else {
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
}
|
||||
} elseif ($obj->error == 'ErrorLoginAlreadyExists')
|
||||
{
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
} elseif ($obj->error == 'ErrorLoginAlreadyExists') {
|
||||
print "User with login ".$obj->login." already exists\n";
|
||||
} else {
|
||||
$error++;
|
||||
dol_print_error($db, $obj->error);
|
||||
@ -89,8 +91,7 @@ if ($idobject > 0)
|
||||
|
||||
// -------------------- END OF YOUR CODE --------------------
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (! $error) {
|
||||
$db->commit();
|
||||
print '--- end ok'."\n";
|
||||
} else {
|
||||
|
||||
@ -29,8 +29,8 @@ $path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Global variables
|
||||
@ -49,14 +49,17 @@ $langs->load("main"); // To load language file for default language
|
||||
|
||||
// Load user and its permissions
|
||||
$result=$user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (! $result > 0) { dol_print_error('', $user->error); exit; }
|
||||
if (! $result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
||||
|
||||
print "***** ".$script_file." (".$version.") *****\n";
|
||||
if (! isset($argv[1])) { // Check parameters
|
||||
print "Usage: ".$script_file." id_thirdparty ...\n";
|
||||
exit;
|
||||
print "Usage: ".$script_file." id_thirdparty ...\n";
|
||||
exit;
|
||||
}
|
||||
print '--- start'."\n";
|
||||
print 'Argument id_thirdparty='.$argv[1]."\n";
|
||||
|
||||
49
dev/examples/git/pre-commit
Normal file
49
dev/examples/git/pre-commit
Normal file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
|
||||
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
|
||||
|
||||
# Determine if a file list is passed
|
||||
if [ "$#" -eq 1 ]
|
||||
then
|
||||
oIFS=$IFS
|
||||
IFS='
|
||||
'
|
||||
SFILES="$1"
|
||||
IFS=$oIFS
|
||||
fi
|
||||
SFILES=${SFILES:-$STAGED_FILES_CMD}
|
||||
|
||||
echo "Checking PHP Lint..."
|
||||
for FILE in $SFILES
|
||||
do
|
||||
php -l -d display_errors=0 $PROJECT/$FILE
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
echo "Fix the error before commit."
|
||||
exit 1
|
||||
fi
|
||||
FILES="$FILES $PROJECT/$FILE"
|
||||
done
|
||||
|
||||
if [ "$FILES" != "" ]
|
||||
then
|
||||
echo "Running PHPCS Code Sniffer..."
|
||||
#~/vendor/bin/phpcs --version
|
||||
#phpcs --standard=PSR2 --encoding=utf-8 -n -p $FILES
|
||||
# Check Dolibarr standard
|
||||
~/vendor/bin/phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||
# Check your own standard
|
||||
#~/vendor/bin/phpcs -s -p -d memory_limit=-1 --parallel=2 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
# fix standard errors
|
||||
~/vendor/bin/phpcbf -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||
#~/vendor/bin/phpcbf -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=htdocs/custom/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true $FILES
|
||||
echo "Fix the error before commit."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $?
|
||||
Binary file not shown.
@ -1,3 +1,7 @@
|
||||
Barcode EAN 13
|
||||
|
||||
FR
|
||||
==
|
||||
Signification des chiffres.
|
||||
|
||||
- 2 chiffres pour le code pays ou code systeme
|
||||
@ -9,6 +13,24 @@ Cette regle subit de nombreuses entorses pour ameliorer l'usage des chiffres dis
|
||||
Voici la liste des codes pays ou systeme :
|
||||
|
||||
|
||||
|
||||
EN
|
||||
==
|
||||
Meaning of the numbers.
|
||||
|
||||
- 2 digits for the country code or system code
|
||||
- 5 digits for the company identifier
|
||||
- 5 digits for item identifier
|
||||
- 1 digit for checksum
|
||||
|
||||
This rule has been twisted many times to improve the use of the available numbers.
|
||||
Here is the list of country codes or system:
|
||||
|
||||
|
||||
|
||||
List
|
||||
====
|
||||
|
||||
00 <20> 13 UCC (Etats-Unis et Canada)
|
||||
20 <20> 29 Codification interne en magasin
|
||||
30 <20> 37 GENCOD-EAN France
|
||||
@ -104,4 +126,4 @@ Voici la liste des codes pays ou systeme :
|
||||
978 - 979 Livres (ISBN)
|
||||
980 Refus de remboursement
|
||||
981 - 982 Coupons (monnaie courante)
|
||||
99 Coupons
|
||||
99 Coupons
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
* Page with license compatibility
|
||||
https://www.gnu.org/licenses/quick-guide-gplv3.fr.html
|
||||
[EN] https://www.gnu.org/licenses/quick-guide-gplv3.en.html
|
||||
[FR] https://www.gnu.org/licenses/quick-guide-gplv3.fr.html
|
||||
|
||||
* FAQ on GPL license
|
||||
https://www.fsf.org/licensing/licenses/gpl-faq.html
|
||||
|
||||
@ -5,13 +5,13 @@ server {
|
||||
|
||||
root /path/to/your/htdocs;
|
||||
|
||||
# Optionnal
|
||||
# Optional
|
||||
error_log /path/to/your/log/directory/nginx.error.log;
|
||||
access_log /path/to/your/log/directory/nginx.access.log;
|
||||
|
||||
index index.php index.html index.htm;
|
||||
|
||||
# Optionnal
|
||||
# Optional
|
||||
server_name your-fqdn.tld;
|
||||
|
||||
location / {
|
||||
@ -23,6 +23,6 @@ server {
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_read_timeout 600;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock; // /var/run/php/php7.0-fpm.sock
|
||||
}
|
||||
}
|
||||
|
||||
@ -372,26 +372,26 @@ if ($result)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('Options').'</td><td>'.$langs->trans('Description').'</td>';
|
||||
print "</tr>\n";
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL"'.($accounting_product_mode == 'ACCOUNTANCY_SELL' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSell').'</td>';
|
||||
print '<tr class="oddeven"><td><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL"'.($accounting_product_mode == 'ACCOUNTANCY_SELL' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSell').'</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductSellDesc');
|
||||
print "</td></tr>\n";
|
||||
if ($mysoc->isInEEC())
|
||||
{
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_INTRA"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellIntra').'</td>';
|
||||
print '<tr class="oddeven"><td><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_INTRA"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellIntra').'</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductSellIntraDesc');
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_EXPORT"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellExport').'</td>';
|
||||
print '<tr class="oddeven"><td><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_EXPORT"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellExport').'</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductSellExportDesc');
|
||||
print "</td></tr>\n";
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"'.($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '').'> '.$langs->trans('OptionModeProductBuy').'</td>';
|
||||
print '<tr class="oddeven"><td><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"'.($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '').'> '.$langs->trans('OptionModeProductBuy').'</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
|
||||
if ($mysoc->isInEEC())
|
||||
{
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY_INTRA"'.($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA' ? ' checked' : '').'> '.$langs->trans('OptionModeProductBuyIntra').'</td>';
|
||||
print '<tr class="oddeven"><td><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY_INTRA"'.($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA' ? ' checked' : '').'> '.$langs->trans('OptionModeProductBuyIntra').'</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
|
||||
}
|
||||
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY_EXPORT"'.($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT' ? ' checked' : '').'> '.$langs->trans('OptionModeProductBuyExport').'</td>';
|
||||
print '<tr class="oddeven"><td><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY_EXPORT"'.($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT' ? ' checked' : '').'> '.$langs->trans('OptionModeProductBuyExport').'</td>';
|
||||
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
@ -697,7 +697,7 @@ if (!empty($arrayfields['t.piece_num']['checked']))
|
||||
// Code journal
|
||||
if (!empty($arrayfields['t.code_journal']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="'.$search_ledger_code.'"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="'.(is_array($search_ledger_code) ? join('|', $search_ledger_code) : $search_ledger_code).'"></td>';
|
||||
}
|
||||
// Date document
|
||||
if (!empty($arrayfields['t.doc_date']['checked']))
|
||||
|
||||
@ -695,14 +695,15 @@ while ($i < min($num, $limit)) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Piece number
|
||||
if (!empty($arrayfields['t.piece_num']['checked']))
|
||||
{
|
||||
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
||||
print '<td>';
|
||||
$object->id = $line->id;
|
||||
$object->piece_num = $line->piece_num;
|
||||
print $object->getNomUrl(1, '', 0, '', 1);
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Journal code
|
||||
@ -724,21 +725,6 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Piece number
|
||||
if (!empty($arrayfields['t.piece_num']['checked'])) {
|
||||
print '<td>';
|
||||
$object->id = $line->id;
|
||||
$object->piece_num = $line->piece_num;
|
||||
print $object->getNomUrl(1, '', 0, '', 1);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
// Document ref
|
||||
if (!empty($arrayfields['t.doc_ref']['checked'])) {
|
||||
if ($line->doc_type == 'customer_invoice') {
|
||||
|
||||
@ -315,6 +315,7 @@ class BookKeeping extends CommonObject
|
||||
$objnum = $this->db->fetch_object($resqlnum);
|
||||
$this->piece_num = $objnum->piece_num;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this).":: create this->piece_num=".$this->piece_num, LOG_DEBUG);
|
||||
if (empty($this->piece_num)) {
|
||||
$sqlnum = "SELECT MAX(piece_num)+1 as maxpiecenum";
|
||||
@ -327,8 +328,8 @@ class BookKeeping extends CommonObject
|
||||
$objnum = $this->db->fetch_object($resqlnum);
|
||||
$this->piece_num = $objnum->maxpiecenum;
|
||||
}
|
||||
dol_syslog(get_class($this).":: create this->piece_num=".$this->piece_num, LOG_DEBUG);
|
||||
}
|
||||
dol_syslog(get_class($this).":: create this->piece_num=".$this->piece_num, LOG_DEBUG);
|
||||
if (empty($this->piece_num)) {
|
||||
$this->piece_num = 1;
|
||||
}
|
||||
@ -383,7 +384,6 @@ class BookKeeping extends CommonObject
|
||||
$sql .= ", ".(!isset($this->entity) ? $conf->entity : $this->entity);
|
||||
$sql .= ")";
|
||||
|
||||
dol_syslog(get_class($this).":: create sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
|
||||
|
||||
@ -176,7 +176,8 @@ print '<script type="text/javascript">
|
||||
$sql = "SELECT f.rowid as facid, f.ref as ref, f.type, f.datef, f.ref_client,";
|
||||
$sql .= " fd.rowid, fd.description, fd.product_type as line_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
|
||||
$sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell,";
|
||||
$sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.tobuy, p.tosell,";
|
||||
$sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,";
|
||||
$sql .= " aa.rowid as fk_compte, aa.account_number, aa.label, aa.labelshort,";
|
||||
$sql .= " fd.situation_percent,";
|
||||
$sql .= " co.code as country_code, co.label as country,";
|
||||
@ -326,7 +327,7 @@ if ($result) {
|
||||
//print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="'.dol_escape_htmltag($search_tvaintra).'"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_account" value="'.dol_escape_htmltag($search_account).'"></td>';
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
@ -377,6 +378,11 @@ if ($result) {
|
||||
$productstatic->id = $objp->product_id;
|
||||
$productstatic->label = $objp->product_label;
|
||||
$productstatic->type = $objp->line_type;
|
||||
$productstatic->status = $objp->tosell;
|
||||
$productstatic->status_buy = $objp->tobuy;
|
||||
$productstatic->accountancy_code_sell = $objp->accountancy_code_sell;
|
||||
$productstatic->accountancy_code_sell_intra = $objp->accountancy_code_sell_intra;
|
||||
$productstatic->accountancy_code_sell_export = $objp->accountancy_code_sell_export;
|
||||
|
||||
$accountingaccountstatic->rowid = $objp->fk_compte;
|
||||
$accountingaccountstatic->label = $objp->label;
|
||||
@ -424,11 +430,12 @@ if ($result) {
|
||||
|
||||
print '<td>'.$objp->tva_intra.'</td>';
|
||||
|
||||
print '<td class="center">';
|
||||
print '<td>';
|
||||
print $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1);
|
||||
print ' <a class="editfielda" href="./card.php?id='.$objp->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($param ? '?'.$param : '')).'">';
|
||||
print img_edit();
|
||||
print '</a></td>';
|
||||
|
||||
print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="'.$objp->rowid.'"/></td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
@ -532,10 +532,12 @@ if ($result) {
|
||||
}
|
||||
|
||||
// Level 3: Search suggested account for this thirdparty (similar code exists in page index.php to make automatic binding)
|
||||
if (!empty($objp->company_code_sell)) {
|
||||
$objp->code_sell_t = $objp->company_code_sell;
|
||||
$objp->aarowid_suggest = $objp->aarowid_thirdparty;
|
||||
$suggestedaccountingaccountfor = '';
|
||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||
if (!empty($objp->company_code_sell)) {
|
||||
$objp->code_sell_t = $objp->company_code_sell;
|
||||
$objp->aarowid_suggest = $objp->aarowid_thirdparty;
|
||||
$suggestedaccountingaccountfor = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Manage Deposit
|
||||
@ -616,25 +618,32 @@ if ($result) {
|
||||
{
|
||||
print '<br>';
|
||||
$s = '<span class="small">2. '.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': </span>';
|
||||
$shelp = '';
|
||||
$shelp = ''; $ttype = 'help';
|
||||
if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC");
|
||||
elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT");
|
||||
elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') $shelp = $langs->trans("SaleEECWithoutVATNumber");
|
||||
elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
|
||||
$shelp = $langs->trans("SaleEECWithoutVATNumber");
|
||||
$ttype = 'warning';
|
||||
}
|
||||
elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport");
|
||||
$s .= (empty($objp->code_sell_p) ? '<span style="'.$code_sell_p_notset.'">'.$langs->trans("NotDefined").'</span>' : length_accountg($objp->code_sell_p));
|
||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||
print $form->textwithpicto($s, $shelp, 1, $ttype, '', 0, 2, '', 1);
|
||||
} else {
|
||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||
print '<br>';
|
||||
$s = '<span class="small">2. '.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': </span>';
|
||||
$shelp = '';
|
||||
$s .= $langs->trans("NotDefined");
|
||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||
}
|
||||
}
|
||||
if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
|
||||
print '<br>';
|
||||
$s = '<span class="small">2. '.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': </span>';
|
||||
$s = '<span class="small">3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': </span>';
|
||||
$shelp = '';
|
||||
$s .= $langs->trans("NotDefined");
|
||||
$s .= ($objp->code_sell_t > 0 ? length_accountg($objp->code_sell_t) : '<span style="'.$code_sell_t_notset.'">'.$langs->trans("NotDefined").'</span>');
|
||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||
}
|
||||
print '<br>';
|
||||
$s = '<span class="small">3. '.(($objp->type_l == 1) ? $langs->trans("ServiceForThisThirdparty") : $langs->trans("ProductForThisThirdparty")).': </span>';
|
||||
$shelp = '';
|
||||
$s .= ($objp->code_sell_t > 0 ? length_accountg($objp->code_sell_t) : '<span style="'.$code_sell_t_notset.'">'.$langs->trans("NotDefined").'</span>');
|
||||
print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1);
|
||||
print '</td>';
|
||||
|
||||
// Suggested accounting account
|
||||
|
||||
@ -178,7 +178,8 @@ print '<script type="text/javascript">
|
||||
$sql = "SELECT f.rowid as facid, f.ref as ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.fk_soc,";
|
||||
$sql .= " l.rowid, l.fk_product, l.product_type as line_type, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
|
||||
$sql .= " aa.label, aa.labelshort, aa.account_number,";
|
||||
$sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,";
|
||||
$sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.tobuy, p.tosell,";
|
||||
$sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,";
|
||||
$sql .= " co.code as country_code, co.label as country,";
|
||||
$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur";
|
||||
$parameters = array();
|
||||
@ -376,6 +377,11 @@ if ($result) {
|
||||
$productstatic->id = $objp->product_id;
|
||||
$productstatic->label = $objp->product_label;
|
||||
$productstatic->type = $objp->line_type;
|
||||
$productstatic->status = $objp->tosell;
|
||||
$productstatic->status_buy = $objp->tobuy;
|
||||
$productstatic->accountancy_code_buy = $objp->accountancy_code_buy;
|
||||
$productstatic->accountancy_code_buy_intra = $objp->accountancy_code_sell_buy;
|
||||
$productstatic->accountancy_code_buy_export = $objp->accountancy_code_sell_buy;
|
||||
|
||||
$accountingaccountstatic->rowid = $objp->fk_compte;
|
||||
$accountingaccountstatic->label = $objp->label;
|
||||
|
||||
@ -30,6 +30,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
||||
|
||||
@ -85,9 +85,15 @@ if ($result) {
|
||||
$adhtype->label = $objp->label;
|
||||
$AdherentType[$objp->rowid] = $adhtype;
|
||||
|
||||
if ($objp->statut == -1) { $MemberToValidate[$objp->rowid] = $objp->somme; }
|
||||
if ($objp->statut == 1) { $MembersValidated[$objp->rowid] = $objp->somme; }
|
||||
if ($objp->statut == 0) { $MembersResiliated[$objp->rowid] = $objp->somme; }
|
||||
if ($objp->statut == -1) {
|
||||
$MemberToValidate[$objp->rowid] = $objp->somme;
|
||||
}
|
||||
if ($objp->statut == 1) {
|
||||
$MembersValidated[$objp->rowid] = $objp->somme;
|
||||
}
|
||||
if ($objp->statut == 0) {
|
||||
$MembersResiliated[$objp->rowid] = $objp->somme;
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
@ -136,10 +142,14 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) { // This is usel
|
||||
print '<table class="noborder nohover centpercent">';
|
||||
$i = 0;
|
||||
foreach ($listofsearchfields as $key => $value) {
|
||||
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||
if ($i == 0) {
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
|
||||
}
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
|
||||
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||
if ($i == 0) {
|
||||
print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||
}
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
@ -284,7 +294,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
*/
|
||||
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
|
||||
|
||||
$sql = "SELECT a.rowid, a.statut as status, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
|
||||
$sql = "SELECT a.rowid, a.ref, a.statut as status, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
|
||||
$sql .= " a.gender, a.email, a.photo, a.morphy,";
|
||||
$sql .= " a.tms as datem, a.datefin as date_end_subscription,";
|
||||
$sql .= " ta.rowid as typeid, ta.libelle as label, ta.subscription as need_subscription";
|
||||
@ -308,7 +318,7 @@ if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$staticmember->id = $obj->rowid;
|
||||
$staticmember->ref = $obj->rowid;
|
||||
$staticmember->ref = $obj->ref;
|
||||
$staticmember->lastname = $obj->lastname;
|
||||
$staticmember->firstname = $obj->firstname;
|
||||
$staticmember->gender = $obj->gender;
|
||||
|
||||
@ -66,6 +66,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
|
||||
if ($action != 'updateedit' && !$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -236,6 +236,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
$db->commit();
|
||||
} else {
|
||||
$db->rollback();
|
||||
|
||||
@ -172,13 +172,13 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
|
||||
// Show message
|
||||
$message = '';
|
||||
$url = '<a href="'.$urlwithroot.'/dav/fileserver.php" target="_blank">'.$urlwithroot.'/dav/fileserver.php</a>';
|
||||
$message .= img_picto('', 'globe').' '.$langs->trans("WebDavServer", 'WebDAV', $url);
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV', '{url}'));
|
||||
$message .= '<br>';
|
||||
if (!empty($conf->global->DAV_ALLOW_PUBLIC_DIR))
|
||||
{
|
||||
$urlEntity = (!empty($conf->multicompany->enabled) ? '?entity='.$conf->entity : '');
|
||||
$url = '<a href="'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'" target="_blank">'.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.'</a>';
|
||||
$message .= img_picto('', 'globe').' '.$langs->trans("WebDavServer", 'WebDAV public', $url);
|
||||
$message .= img_picto('', 'globe').' '.str_replace('{url}', $url, $langs->trans("WebDavServer", 'WebDAV public', '{url}'));
|
||||
$message .= '<br>';
|
||||
}
|
||||
print $message;
|
||||
|
||||
@ -57,6 +57,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
|
||||
|
||||
if ($action != 'updateedit' && !$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -473,7 +473,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$limitforoptim = 10000;
|
||||
$limitforoptim = 100000;
|
||||
$num = $db->num_rows($resql);
|
||||
$obj = $db->fetch_object($resql);
|
||||
$nb = $obj->nb;
|
||||
|
||||
@ -97,6 +97,14 @@ if ($object->id > 0) {
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
if ($id > 0 && empty($object->id))
|
||||
{
|
||||
// Load data of third party
|
||||
$res = $object->fetch($id);
|
||||
if ($object->id < 0) dol_print_error($db, $object->error, $object->errors);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -226,6 +234,12 @@ if (empty($reshook))
|
||||
}
|
||||
if ($error) $action = 'edit_extras';
|
||||
}
|
||||
|
||||
// warehouse
|
||||
if ($action == 'setwarehouse' && $user->rights->societe->creer)
|
||||
{
|
||||
$result = $object->setWarehouse(GETPOST('fk_warehouse', 'int'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -238,13 +252,6 @@ $userstatic = new User($db);
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
if ($id > 0 && empty($object->id))
|
||||
{
|
||||
// Load data of third party
|
||||
$res = $object->fetch($id);
|
||||
if ($object->id < 0) dol_print_error($db, $object->error, $object->errors);
|
||||
}
|
||||
|
||||
$title = $langs->trans("CustomerCard");
|
||||
if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->name;
|
||||
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
@ -480,7 +487,24 @@ if ($object->id > 0)
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Warehouse
|
||||
if (!empty($conf->stock->enabled))
|
||||
{
|
||||
$langs->load('stocks');
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
$formproduct = new FormProduct($db);
|
||||
print '<tr class="nowrap">';
|
||||
print '<td>';
|
||||
print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $user->rights->societe->creer);
|
||||
print '</td><td>';
|
||||
if ($action == 'editwarehouse') {
|
||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'fk_warehouse', 1);
|
||||
} else {
|
||||
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'none');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
// Preferred shipping Method
|
||||
if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) {
|
||||
print '<tr><td class="nowrap">';
|
||||
|
||||
@ -129,9 +129,6 @@ $permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc
|
||||
$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
|
||||
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
|
||||
|
||||
|
||||
//if ($thirdparty->fk_warehouse > 0) $object->warehouse_id = $thirdparty->fk_warehouse;
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -1495,6 +1492,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
//Warehouse default if null
|
||||
if ($soc->fk_warehouse > 0) $warehouse_id = $soc->fk_warehouse;
|
||||
if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER))
|
||||
{
|
||||
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
|
||||
@ -1581,7 +1579,7 @@ if ($action == 'create')
|
||||
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
|
||||
print img_picto('', 'object_calendarday').' '.$form->selectDate('', '', '', '', '', "addprop", 1, 1);
|
||||
print $form->selectDate('', '', '', '', '', "addprop", 1, 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Validaty duration
|
||||
@ -1644,7 +1642,6 @@ if ($action == 'create')
|
||||
// Delivery date (or manufacturing)
|
||||
print '<tr><td>'.$langs->trans("DeliveryDate").'</td>';
|
||||
print '<td>';
|
||||
print img_picto('', 'object_calendarday').' ';
|
||||
if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "") {
|
||||
$tmpdte = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
|
||||
$syear = date("Y", $tmpdte);
|
||||
@ -1662,8 +1659,7 @@ if ($action == 'create')
|
||||
$langs->load("projects");
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Project").'</td><td>';
|
||||
print img_picto('', 'project');
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print img_picto('', 'project').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -1685,7 +1681,8 @@ if ($action == 'create')
|
||||
print '<td>';
|
||||
print img_picto('', 'pdf').' ';
|
||||
$liste = ModelePDFPropales::liste_modeles($db);
|
||||
print $form->selectarray('model', $liste, ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF));
|
||||
$preselected = ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF);
|
||||
print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print "</td></tr>";
|
||||
|
||||
// Multicurrency
|
||||
|
||||
@ -1534,6 +1534,7 @@ if ($action == 'create' && $usercancreate)
|
||||
}
|
||||
|
||||
//Warehouse default if null
|
||||
if ($soc->fk_warehouse > 0) $warehouse_id = $soc->fk_warehouse;
|
||||
if (!empty($conf->stock->enabled) && empty($warehouse_id) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER))
|
||||
{
|
||||
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE;
|
||||
@ -1616,14 +1617,14 @@ if ($action == 'create' && $usercancreate)
|
||||
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
|
||||
print img_picto('', 'object_calendarday').' '.$form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
|
||||
print $form->selectDate('', 're', '', '', '', "crea_commande", 1, 1); // Always autofill date with current date
|
||||
print '</td></tr>';
|
||||
|
||||
// Date delivery planned
|
||||
print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$date_delivery = ($date_delivery ? $date_delivery : $object->date_delivery);
|
||||
print img_picto('', 'object_calendarday').' '.$form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1);
|
||||
print $form->selectDate($date_delivery ? $date_delivery : -1, 'date_delivery', 1, 1, 1);
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
@ -1731,7 +1732,8 @@ if ($action == 'create' && $usercancreate)
|
||||
print img_picto('', 'pdf').' ';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php';
|
||||
$liste = ModelePDFCommandes::liste_modeles($db);
|
||||
print $form->selectarray('model', $liste, $conf->global->COMMANDE_ADDON_PDF);
|
||||
$preselected = $conf->global->COMMANDE_ADDON_PDF;
|
||||
print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print "</td></tr>";
|
||||
|
||||
// Multicurrency
|
||||
|
||||
@ -2893,19 +2893,20 @@ class Commande extends CommonOrder
|
||||
* Classify the order as invoiced
|
||||
*
|
||||
* @param User $user Object user making the change
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param int $notrigger 1=Does not execute triggers, 0=execute triggers
|
||||
* @return int <0 if KO, 0 if already billed, >0 if OK
|
||||
*/
|
||||
public function classifyBilled(User $user, $notrigger = 0)
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
$this->db->begin();
|
||||
if ($this->billed)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET facture = 1';
|
||||
$sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT;
|
||||
|
||||
|
||||
@ -128,7 +128,9 @@ if ($action == 'add')
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
$mesgs = $langs->trans("TransferFromToDone", '<a href="bankentries_list.php?id='.$accountfrom->id.'&sortfield=b.datev,b.dateo,b.rowid&sortorder=desc">'.$accountfrom->label."</a>", '<a href="bankentries_list.php?id='.$accountto->id.'">'.$accountto->label."</a>", $amount, $langs->transnoentities("Currency".$conf->currency));
|
||||
$mesgs = $langs->trans("TransferFromToDone", '{s1}', '{s2}', $amount, $langs->transnoentitiesnoconv("Currency".$conf->currency));
|
||||
$mesgs = str_replace('{s1}', '<a href="bankentries_list.php?id='.$accountfrom->id.'&sortfield=b.datev,b.dateo,b.rowid&sortorder=desc">'.$accountfrom->label.'</a>', $mesgs);
|
||||
$mesgs = str_replace('{s2}', '<a href="bankentries_list.php?id='.$accountto->id.'">'.$accountto->label.'</a>', $mesgs);
|
||||
setEventMessages($mesgs, null, 'mesgs');
|
||||
$db->commit();
|
||||
} else {
|
||||
|
||||
@ -2956,7 +2956,7 @@ if ($action == 'create')
|
||||
} else {
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||
print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||
// Option to reload page to retrieve customer informations.
|
||||
if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED))
|
||||
{
|
||||
@ -3444,11 +3444,11 @@ if ($action == 'create')
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
if (GETPOSTISSET('fk_account')) {
|
||||
$fk_account = GETPOST('fk_account');
|
||||
$fk_account = GETPOST('fk_account', 'int');
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
||||
print img_picto('', 'bank_account', 'class="paddingrightonly"').$form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -3457,7 +3457,7 @@ if ($action == 'create')
|
||||
{
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
|
||||
$numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -3504,11 +3504,11 @@ if ($action == 'create')
|
||||
if (!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) {
|
||||
// Hidden conf
|
||||
$paramkey = 'FACTURE_ADDON_PDF_'.$object->type;
|
||||
$curent = !empty($conf->global->$paramkey) ? $conf->global->$paramkey : $conf->global->FACTURE_ADDON_PDF;
|
||||
$preselected = !empty($conf->global->$paramkey) ? $conf->global->$paramkey : $conf->global->FACTURE_ADDON_PDF;
|
||||
} else {
|
||||
$curent = $conf->global->FACTURE_ADDON_PDF;
|
||||
$preselected = $conf->global->FACTURE_ADDON_PDF;
|
||||
}
|
||||
print $form->selectarray('model', $liste, $curent);
|
||||
print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print "</td></tr>";
|
||||
|
||||
// Multicurrency
|
||||
@ -4144,7 +4144,7 @@ if ($action == 'create')
|
||||
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
|
||||
if ($result > 0) {
|
||||
print ' <span class="opacitymediumbycolor paddingleft">';
|
||||
print $langs->transnoentities("GeneratedFromTemplate", '<a href="'.DOL_MAIN_URL_ROOT.'/compta/facture/card-rec.php?facid='.$tmptemplate->id.'">'.dol_escape_htmltag($tmptemplate->ref).'</a>');
|
||||
print $langs->transnoentities("GeneratedFromTemplate", '<a href="'.DOL_URL_ROOT.'/compta/facture/card-rec.php?facid='.$tmptemplate->id.'">'.dol_escape_htmltag($tmptemplate->ref).'</a>');
|
||||
print '</span>';
|
||||
}
|
||||
}
|
||||
@ -4285,7 +4285,7 @@ if ($action == 'create')
|
||||
print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0);
|
||||
print '</td>';
|
||||
if ($usercancreate && $action != 'editmulticurrencyrate' && !empty($object->brouillon) && $object->multicurrency_code && $object->multicurrency_code != $conf->currency)
|
||||
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencyrate&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>';
|
||||
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencyrate&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td>';
|
||||
if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') {
|
||||
|
||||
@ -2072,6 +2072,8 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
$sql .= ", fk_contract_line=".($this->fk_contract_line ? $this->fk_contract_line : "null");
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(get_class($this)."::updateline", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
@ -2091,13 +2093,18 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
$result = $this->call_trigger('LINEBILLREC_UPDATE', $user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
$error++;
|
||||
}
|
||||
// End call triggers
|
||||
}
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
|
||||
@ -401,6 +401,7 @@ class Paiement extends CommonObject
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error = $invoice->error;
|
||||
$this->errors = $invoice->errors;
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ if ($action == 'create')
|
||||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
$datepaye = dol_mktime(12, 0, 0, GETPOST("remonth", 'int'), GETPOST("reday", 'int'), GETPOST("reyear", 'int'));
|
||||
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (GETPOSTISSET("remonth") ? $datepaye : -1) : 0;
|
||||
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (GETPOSTISSET("remonth") ? $datepaye : -1) : '';
|
||||
print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution"));
|
||||
print "</td>";
|
||||
print '</tr>';
|
||||
@ -236,7 +236,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td class="fieldrequired">'.$langs->trans('AccountToDebit').'</td>';
|
||||
print '<td>';
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid") : $charge->accountid, "accountid", 0, '', 2); // Show opend bank account list
|
||||
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $charge->accountid, "accountid", 0, '', 2); // Show opend bank account list
|
||||
print '</td></tr>';
|
||||
|
||||
// Number
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -354,8 +354,8 @@ if ($id > 0 || $ref)
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
{
|
||||
if (($page * $limit) > $nbtotalofrecords) {
|
||||
// if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
@ -445,15 +445,14 @@ if ($id > 0 || $ref)
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
if ($num > 0) {
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td class="right">';
|
||||
if (empty($offset) && $num <= $limit) // If we have all record on same page, then the following test/warning can be done
|
||||
{
|
||||
if ($total != $object->amount) print img_warning("TotalAmountOfdirectDebitOrderDiffersFromSumOfLines");
|
||||
if (empty($offset) && $num <= $limit) {
|
||||
// If we have all record on same page, then the following test/warning can be done
|
||||
if ($total != $object->amount) print img_warning($langs->trans("TotalAmountOfdirectDebitOrderDiffersFromSumOfLines"));
|
||||
}
|
||||
print price($total);
|
||||
print "</td>\n";
|
||||
|
||||
@ -66,18 +66,14 @@ $parameters = array('mode' => $mode, 'format' => $format, 'limit' => $limit, 'pa
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
if (empty($reshook)) {
|
||||
// Change customer bank information to withdraw
|
||||
if ($action == 'modify')
|
||||
{
|
||||
for ($i = 1; $i < 9; $i++)
|
||||
{
|
||||
if ($action == 'modify') {
|
||||
for ($i = 1; $i < 9; $i++) {
|
||||
dolibarr_set_const($db, GETPOST("nom$i"), GETPOST("value$i"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
}
|
||||
if ($action == 'create')
|
||||
{
|
||||
if ($action == 'create') {
|
||||
$default_account=($type == 'bank-transfer' ? 'PAYMENTBYBANKTRANSFER_ID_BANKACCOUNT' : 'PRELEVEMENT_ID_BANKACCOUNT');
|
||||
|
||||
if ($id_bankaccount != $conf->global->{$default_account}){
|
||||
@ -88,7 +84,8 @@ if (empty($reshook))
|
||||
$bank = new Account($db);
|
||||
$bank->fetch($conf->global->{$default_account});
|
||||
if (empty($bank->ics) || empty($bank->ics_transfer)){
|
||||
setEventMessages($langs->trans("ErrorICSmissing", $bank->getNomUrl(1)), null, 'errors');
|
||||
$errormessage = str_replace('{url}', $bank->getNomUrl(1), $langs->trans("ErrorICSmissing", '{url}'));
|
||||
setEventMessages($errormessage, null, 'errors');
|
||||
header("Location: ".DOL_URL_ROOT.'/compta/prelevement/create.php');
|
||||
exit;
|
||||
}
|
||||
@ -111,8 +108,7 @@ if (empty($reshook))
|
||||
$mesg = $langs->trans("NoInvoiceCouldBeWithdrawed", $format);
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
$mesg .= '<br>'."\n";
|
||||
foreach ($bprev->invoice_in_error as $key => $val)
|
||||
{
|
||||
foreach ($bprev->invoice_in_error as $key => $val) {
|
||||
$mesg .= '<span class="warning">'.$val."</span><br>\n";
|
||||
}
|
||||
} else {
|
||||
@ -145,8 +141,7 @@ $bprev = new BonPrelevement($db);
|
||||
|
||||
llxHeader('', $langs->trans("NewStandingOrder"));
|
||||
|
||||
if (prelevement_check_config($type) < 0)
|
||||
{
|
||||
if (prelevement_check_config($type) < 0) {
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors');
|
||||
}
|
||||
@ -237,8 +232,7 @@ if ($nb) {
|
||||
print '<a class="butAction" type="submit" href="create.php?action=create&format=ALL&type='.$type.'">'.$title."</a>\n";
|
||||
}
|
||||
} else {
|
||||
if ($mysoc->isInEEC())
|
||||
{
|
||||
if ($mysoc->isInEEC()) {
|
||||
$title = $langs->trans("CreateForSepaFRST");
|
||||
if ($type == 'bank-transfer') {
|
||||
$title = $langs->trans("CreateSepaFileForPaymentByBankTransfer");
|
||||
@ -289,8 +283,7 @@ $sql .= " ".MAIN_DB_PREFIX."societe as s,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
$sql .= " WHERE s.rowid = f.fk_soc";
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice').")";
|
||||
if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS))
|
||||
{
|
||||
if (empty($conf->global->WITHDRAWAL_ALLOW_ANY_INVOICE_STATUS)) {
|
||||
$sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED;
|
||||
}
|
||||
//$sql .= " AND pfd.amount > 0";
|
||||
@ -305,12 +298,11 @@ if ($type == 'bank-transfer') {
|
||||
if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid;
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
{
|
||||
if (($page * $limit) > $nbtotalofrecords) {
|
||||
// if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
@ -399,7 +391,7 @@ if ($resql)
|
||||
if ($format) print ' ('.$format.')';
|
||||
}
|
||||
} else {
|
||||
print img_warning($langs->trans("NoBankAccount"));
|
||||
print img_warning($langs->trans("NoBankAccountDefined"));
|
||||
}
|
||||
print '</td>';
|
||||
// Amount
|
||||
|
||||
@ -145,14 +145,32 @@ class Contact extends CommonObject
|
||||
*/
|
||||
public $town;
|
||||
|
||||
public $state_id; // Id of department
|
||||
public $state_code; // Code of department
|
||||
public $state; // Label of department
|
||||
/**
|
||||
* @var int // Id of department
|
||||
*/
|
||||
public $state_id;
|
||||
|
||||
/**
|
||||
* @var string // Code of department
|
||||
*/
|
||||
public $state_code;
|
||||
|
||||
/**
|
||||
* @var string // Label of department
|
||||
*/
|
||||
public $state;
|
||||
|
||||
public $poste; // Position
|
||||
|
||||
public $socid; // fk_soc
|
||||
public $statut; // 0=inactif, 1=actif
|
||||
/**
|
||||
* @var int Thirdparty ID
|
||||
*/
|
||||
public $socid;
|
||||
|
||||
/**
|
||||
* @var int 0=inactive, 1=active
|
||||
*/
|
||||
public $statut;
|
||||
|
||||
public $code;
|
||||
|
||||
@ -247,7 +265,14 @@ class Contact extends CommonObject
|
||||
public $ref_commande; // Nb de reference commande pour lequel il est contact
|
||||
public $ref_propal; // Nb de reference propal pour lequel il est contact
|
||||
|
||||
/**
|
||||
* @var int user ID
|
||||
*/
|
||||
public $user_id;
|
||||
|
||||
/**
|
||||
* @var string user login
|
||||
*/
|
||||
public $user_login;
|
||||
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
@ -259,12 +284,19 @@ class Contact extends CommonObject
|
||||
*/
|
||||
public $oldcopy; // To contains a clone of this when we need to save old properties of object
|
||||
|
||||
/**
|
||||
* @var array roles
|
||||
*/
|
||||
public $roles = array();
|
||||
|
||||
public $cacheprospectstatus = array();
|
||||
public $fk_prospectlevel;
|
||||
public $stcomm_id;
|
||||
public $statut_commercial;
|
||||
|
||||
/**
|
||||
* @var string picto
|
||||
*/
|
||||
public $stcomm_picto;
|
||||
|
||||
/**
|
||||
@ -335,8 +367,7 @@ class Contact extends CommonObject
|
||||
|
||||
$sql = "SELECT count(sp.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
|
||||
if (!$user->rights->societe->client->voir && !$user->socid)
|
||||
{
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql .= " WHERE sp.fk_soc = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
@ -344,13 +375,13 @@ class Contact extends CommonObject
|
||||
}
|
||||
$sql .= ' '.$clause.' sp.entity IN ('.getEntity($this->element).')';
|
||||
$sql .= " AND (sp.priv='0' OR (sp.priv='1' AND sp.fk_user_creat=".$user->id."))";
|
||||
if ($user->socid > 0) $sql .= " AND sp.fk_soc = ".$user->socid;
|
||||
if ($user->socid > 0) {
|
||||
$sql .= " AND sp.fk_soc = ".$user->socid;
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
$this->nb["contacts"] = $obj->nb;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
@ -402,8 +433,11 @@ class Contact extends CommonObject
|
||||
$sql .= ", import_key";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= "'".$this->db->idate($now)."',";
|
||||
if ($this->socid > 0) $sql .= " ".$this->db->escape($this->socid).",";
|
||||
else $sql .= "null,";
|
||||
if ($this->socid > 0) {
|
||||
$sql .= " ".$this->db->escape($this->socid).",";
|
||||
} else {
|
||||
$sql .= "null,";
|
||||
}
|
||||
$sql .= "'".$this->db->escape($this->lastname)."',";
|
||||
$sql .= "'".$this->db->escape($this->firstname)."',";
|
||||
$sql .= " ".($user->id > 0 ? "'".$this->db->escape($user->id)."'" : "null").",";
|
||||
@ -721,8 +755,7 @@ class Contact extends CommonObject
|
||||
if ($this->firstname && !empty($conf->global->LDAP_CONTACT_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname;
|
||||
|
||||
if ($this->poste) $info["title"] = $this->poste;
|
||||
if ($this->socid > 0)
|
||||
{
|
||||
if ($this->socid > 0) {
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($this->socid);
|
||||
|
||||
@ -757,8 +790,7 @@ class Contact extends CommonObject
|
||||
$info["phpgwContactCatId"] = 0;
|
||||
$info["phpgwContactAccess"] = "public";
|
||||
|
||||
if (dol_strlen($this->egroupware_id) == 0)
|
||||
{
|
||||
if (dol_strlen($this->egroupware_id) == 0) {
|
||||
$this->egroupware_id = 1;
|
||||
}
|
||||
|
||||
@ -1971,8 +2003,7 @@ class Contact extends CommonObject
|
||||
{
|
||||
$sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$this->db->escape($this->email)."'";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($resql) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$this->no_email = $obj->nb;
|
||||
return 1;
|
||||
|
||||
@ -933,31 +933,31 @@ while ($i < min($num, $limit))
|
||||
// Phone
|
||||
if (!empty($arrayfields['p.phone']['checked']))
|
||||
{
|
||||
print '<td>'.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').'</td>';
|
||||
print '<td>'.dol_print_phone($obj->phone_pro, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Phone perso
|
||||
if (!empty($arrayfields['p.phone_perso']['checked']))
|
||||
{
|
||||
print '<td>'.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').'</td>';
|
||||
print '<td>'.dol_print_phone($obj->phone_perso, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'phone').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Phone mobile
|
||||
if (!empty($arrayfields['p.phone_mobile']['checked']))
|
||||
{
|
||||
print '<td>'.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').'</td>';
|
||||
print '<td>'.dol_print_phone($obj->phone_mobile, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'mobile').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Fax
|
||||
if (!empty($arrayfields['p.fax']['checked']))
|
||||
{
|
||||
print '<td>'.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL').'</td>';
|
||||
print '<td>'.dol_print_phone($obj->fax, $obj->country_code, $obj->rowid, $obj->socid, 'AC_TEL', ' ', 'fax').'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// EMail
|
||||
if (!empty($arrayfields['p.email']['checked']))
|
||||
{
|
||||
print '<td>'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18).'</td>';
|
||||
print '<td>'.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 18, 0, 1).'</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// No EMail
|
||||
|
||||
@ -275,7 +275,6 @@ if ($search_dfyear > 0 && $search_op2df)
|
||||
else $sql .= " HAVING MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") <= '".$db->idate(dol_get_last_day($search_dfyear, $search_dfmonth, false))."' AND MIN(".$db->ifsql("cd.statut=4", "cd.date_fin_validite", "null").") >= '".$db->idate(dol_get_first_day($search_dfyear, $search_dfmonth, false))."'";
|
||||
}
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
//print $sql;
|
||||
|
||||
$totalnboflines = 0;
|
||||
$result = $db->query($sql);
|
||||
|
||||
@ -590,7 +590,8 @@ if (!$error && $massaction == 'confirm_presend')
|
||||
}
|
||||
}
|
||||
|
||||
if ($massaction == 'confirm_createbills') // Create bills from orders
|
||||
// TODO Move this action into commande/list.php if called only by this page.
|
||||
if ($massaction == 'confirm_createbills') // Create bills from orders.
|
||||
{
|
||||
$orders = GETPOST('toselect', 'array');
|
||||
$createbills_onebythird = GETPOST('createbills_onebythird', 'int');
|
||||
@ -600,6 +601,8 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
|
||||
$TFactThird = array();
|
||||
|
||||
$nb_bills_created = 0;
|
||||
$lastid= 0;
|
||||
$lastref = '';
|
||||
|
||||
$db->begin();
|
||||
|
||||
@ -609,8 +612,9 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
|
||||
if ($cmd->fetch($id_order) <= 0) continue;
|
||||
|
||||
$objecttmp = new Facture($db);
|
||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order.
|
||||
else {
|
||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) {
|
||||
$objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order.
|
||||
} else {
|
||||
// Load extrafields of order
|
||||
$cmd->fetch_optionals();
|
||||
|
||||
@ -636,7 +640,11 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
|
||||
|
||||
$res = $objecttmp->create($user);
|
||||
|
||||
if ($res > 0) $nb_bills_created++;
|
||||
if ($res > 0) {
|
||||
$nb_bills_created++;
|
||||
$lastref = $objecttmp->ref;
|
||||
$lastid = $objecttmp->id;
|
||||
}
|
||||
}
|
||||
|
||||
if ($objecttmp->id > 0)
|
||||
@ -818,7 +826,14 @@ if ($massaction == 'confirm_createbills') // Create bills from orders
|
||||
if (!$error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs');
|
||||
|
||||
if ($nb_bills_created == 1) {
|
||||
$texttoshow = $langs->trans('BillXCreated', '{s1}');
|
||||
$texttoshow = str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?id='.urlencode($lastid).'">'.$lastref.'</a>', $texttoshow);
|
||||
setEventMessages($texttoshow, null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs');
|
||||
}
|
||||
|
||||
// Make a redirect to avoid to bill twice if we make a refresh or back
|
||||
$param = '';
|
||||
|
||||
323
htdocs/core/boxes/box_dolibarr_state_board.php
Normal file
323
htdocs/core/boxes/box_dolibarr_state_board.php
Normal file
@ -0,0 +1,323 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2021 Frederic France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/boxes/box_dolibarr_state_board.php
|
||||
* \ingroup
|
||||
* \brief Module Dolibarr state base
|
||||
*/
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php';
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage the box to show last thirdparties
|
||||
*/
|
||||
class box_dolibarr_state_board extends ModeleBoxes
|
||||
{
|
||||
public $boxcode = "dolibarrstatebox";
|
||||
public $boximg = "generic";
|
||||
public $boxlabel = "BoxDolibarrStateBoard";
|
||||
public $depends = array("user");
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
public $enabled = 1;
|
||||
|
||||
public $info_box_head = array();
|
||||
public $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
public function __construct($db, $param = '')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
// disable box for such cases
|
||||
if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
||||
$this->enabled = 0; // disabled by this option
|
||||
}
|
||||
|
||||
$this->hidden = !($user->rights->societe->lire && empty($user->socid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data for box to show them later
|
||||
*
|
||||
* @param int $max Maximum number of records to load
|
||||
* @return void
|
||||
*/
|
||||
public function loadBox($max = 5)
|
||||
{
|
||||
global $user, $langs, $conf;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->max = $max;
|
||||
$this->info_box_head = array('text' => $langs->trans("DolibarrStateBoard"));
|
||||
|
||||
if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) {
|
||||
$hookmanager = new HookManager($this->db);
|
||||
$hookmanager->initHooks(array('index'));
|
||||
$boxstatItems = array();
|
||||
$boxstatFromHook = '';
|
||||
$boxstatFromHook = $hookmanager->resPrint;
|
||||
$boxstat = '';
|
||||
|
||||
$keys = array(
|
||||
'users',
|
||||
'members',
|
||||
'expensereports',
|
||||
'holidays',
|
||||
'customers',
|
||||
'prospects',
|
||||
'suppliers',
|
||||
'contacts',
|
||||
'products',
|
||||
'services',
|
||||
'projects',
|
||||
'proposals',
|
||||
'orders',
|
||||
'invoices',
|
||||
'donations',
|
||||
'supplier_proposals',
|
||||
'supplier_orders',
|
||||
'supplier_invoices',
|
||||
'contracts',
|
||||
'interventions',
|
||||
'ticket'
|
||||
);
|
||||
$conditions = array(
|
||||
'users' => $user->rights->user->user->lire,
|
||||
'members' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire,
|
||||
'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
|
||||
'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
|
||||
'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
|
||||
'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire,
|
||||
'products' => !empty($conf->product->enabled) && $user->rights->produit->lire,
|
||||
'services' => !empty($conf->service->enabled) && $user->rights->service->lire,
|
||||
'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire,
|
||||
'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire,
|
||||
'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire,
|
||||
'donations' => !empty($conf->don->enabled) && $user->rights->don->lire,
|
||||
'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire,
|
||||
'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire,
|
||||
'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS),
|
||||
'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS),
|
||||
'supplier_proposals' => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS),
|
||||
'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire,
|
||||
'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire,
|
||||
'holidays' => !empty($conf->holiday->enabled) && $user->rights->holiday->read,
|
||||
'ticket' => !empty($conf->ticket->enabled) && $user->rights->ticket->read
|
||||
);
|
||||
$classes = array(
|
||||
'users' => 'User',
|
||||
'members' => 'Adherent',
|
||||
'customers' => 'Client',
|
||||
'prospects' => 'Client',
|
||||
'suppliers' => 'Fournisseur',
|
||||
'contacts' => 'Contact',
|
||||
'products' => 'Product',
|
||||
'services' => 'ProductService',
|
||||
'proposals' => 'Propal',
|
||||
'orders' => 'Commande',
|
||||
'invoices' => 'Facture',
|
||||
'donations' => 'Don',
|
||||
'contracts' => 'Contrat',
|
||||
'interventions' => 'Fichinter',
|
||||
'supplier_orders' => 'CommandeFournisseur',
|
||||
'supplier_invoices' => 'FactureFournisseur',
|
||||
'supplier_proposals' => 'SupplierProposal',
|
||||
'projects' => 'Project',
|
||||
'expensereports' => 'ExpenseReport',
|
||||
'holidays' => 'Holiday',
|
||||
'ticket' => 'Ticket',
|
||||
);
|
||||
$includes = array(
|
||||
'users' => DOL_DOCUMENT_ROOT . "/user/class/user.class.php",
|
||||
'members' => DOL_DOCUMENT_ROOT . "/adherents/class/adherent.class.php",
|
||||
'customers' => DOL_DOCUMENT_ROOT . "/societe/class/client.class.php",
|
||||
'prospects' => DOL_DOCUMENT_ROOT . "/societe/class/client.class.php",
|
||||
'suppliers' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.class.php",
|
||||
'contacts' => DOL_DOCUMENT_ROOT . "/contact/class/contact.class.php",
|
||||
'products' => DOL_DOCUMENT_ROOT . "/product/class/product.class.php",
|
||||
'services' => DOL_DOCUMENT_ROOT . "/product/class/product.class.php",
|
||||
'proposals' => DOL_DOCUMENT_ROOT . "/comm/propal/class/propal.class.php",
|
||||
'orders' => DOL_DOCUMENT_ROOT . "/commande/class/commande.class.php",
|
||||
'invoices' => DOL_DOCUMENT_ROOT . "/compta/facture/class/facture.class.php",
|
||||
'donations' => DOL_DOCUMENT_ROOT . "/don/class/don.class.php",
|
||||
'contracts' => DOL_DOCUMENT_ROOT . "/contrat/class/contrat.class.php",
|
||||
'interventions' => DOL_DOCUMENT_ROOT . "/fichinter/class/fichinter.class.php",
|
||||
'supplier_orders' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.commande.class.php",
|
||||
'supplier_invoices' => DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.facture.class.php",
|
||||
'supplier_proposals' => DOL_DOCUMENT_ROOT . "/supplier_proposal/class/supplier_proposal.class.php",
|
||||
'projects' => DOL_DOCUMENT_ROOT . "/projet/class/project.class.php",
|
||||
'expensereports' => DOL_DOCUMENT_ROOT . "/expensereport/class/expensereport.class.php",
|
||||
'holidays' => DOL_DOCUMENT_ROOT . "/holiday/class/holiday.class.php",
|
||||
'ticket' => DOL_DOCUMENT_ROOT . "/ticket/class/ticket.class.php"
|
||||
);
|
||||
$links = array(
|
||||
'users' => DOL_URL_ROOT . '/user/list.php',
|
||||
'members' => DOL_URL_ROOT . '/adherents/list.php?statut=1&mainmenu=members',
|
||||
'customers' => DOL_URL_ROOT . '/societe/list.php?type=c&mainmenu=companies',
|
||||
'prospects' => DOL_URL_ROOT . '/societe/list.php?type=p&mainmenu=companies',
|
||||
'suppliers' => DOL_URL_ROOT . '/societe/list.php?type=f&mainmenu=companies',
|
||||
'contacts' => DOL_URL_ROOT . '/contact/list.php?mainmenu=companies',
|
||||
'products' => DOL_URL_ROOT . '/product/list.php?type=0&mainmenu=products',
|
||||
'services' => DOL_URL_ROOT . '/product/list.php?type=1&mainmenu=products',
|
||||
'proposals' => DOL_URL_ROOT . '/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
|
||||
'orders' => DOL_URL_ROOT . '/commande/list.php?mainmenu=commercial&leftmenu=orders',
|
||||
'invoices' => DOL_URL_ROOT . '/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
|
||||
'donations' => DOL_URL_ROOT . '/don/list.php?leftmenu=donations',
|
||||
'contracts' => DOL_URL_ROOT . '/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
|
||||
'interventions' => DOL_URL_ROOT . '/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
|
||||
'supplier_orders' => DOL_URL_ROOT . '/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
|
||||
'supplier_invoices' => DOL_URL_ROOT . '/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
|
||||
'supplier_proposals' => DOL_URL_ROOT . '/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
|
||||
'projects' => DOL_URL_ROOT . '/projet/list.php?mainmenu=project',
|
||||
'expensereports' => DOL_URL_ROOT . '/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
|
||||
'holidays' => DOL_URL_ROOT . '/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
|
||||
'ticket' => DOL_URL_ROOT . '/ticket/list.php?leftmenu=ticket'
|
||||
);
|
||||
$titres = array(
|
||||
'users' => "Users",
|
||||
'members' => "Members",
|
||||
'customers' => "ThirdPartyCustomersStats",
|
||||
'prospects' => "ThirdPartyProspectsStats",
|
||||
'suppliers' => "Suppliers",
|
||||
'contacts' => "Contacts",
|
||||
'products' => "Products",
|
||||
'services' => "Services",
|
||||
'proposals' => "CommercialProposalsShort",
|
||||
'orders' => "CustomersOrders",
|
||||
'invoices' => "BillsCustomers",
|
||||
'donations' => "Donations",
|
||||
'contracts' => "Contracts",
|
||||
'interventions' => "Interventions",
|
||||
'supplier_orders' => "SuppliersOrders",
|
||||
'supplier_invoices' => "SuppliersInvoices",
|
||||
'supplier_proposals' => "SupplierProposalShort",
|
||||
'projects' => "Projects",
|
||||
'expensereports' => "ExpenseReports",
|
||||
'holidays' => "Holidays",
|
||||
'ticket' => "Ticket",
|
||||
);
|
||||
$langfile = array(
|
||||
'customers' => "companies",
|
||||
'contacts' => "companies",
|
||||
'services' => "products",
|
||||
'proposals' => "propal",
|
||||
'invoices' => "bills",
|
||||
'supplier_orders' => "orders",
|
||||
'supplier_invoices' => "bills",
|
||||
'supplier_proposals' => 'supplier_proposal',
|
||||
'expensereports' => "trips",
|
||||
'holidays' => "holiday",
|
||||
);
|
||||
$boardloaded = array();
|
||||
|
||||
foreach ($keys as $val) {
|
||||
if ($conditions[$val]) {
|
||||
$boxstatItem = '';
|
||||
$class = $classes[$val];
|
||||
// Search in cache if load_state_board is already realized
|
||||
$classkeyforcache = $class;
|
||||
if ($classkeyforcache == 'ProductService') $classkeyforcache = 'Product'; // ProductService use same load_state_board than Product
|
||||
|
||||
if (!isset($boardloaded[$classkeyforcache]) || !is_object($boardloaded[$classkeyforcache])) {
|
||||
include_once $includes[$val]; // Loading a class cost around 1Mb
|
||||
|
||||
$board = new $class($this->db);
|
||||
$board->load_state_board();
|
||||
$boardloaded[$class] = $board;
|
||||
} else {
|
||||
$board = $boardloaded[$classkeyforcache];
|
||||
}
|
||||
|
||||
$langs->load(empty($langfile[$val]) ? $val : $langfile[$val]);
|
||||
|
||||
$text = $langs->trans($titres[$val]);
|
||||
$boxstatItem .= '<a href="' . $links[$val] . '" class="boxstatsindicator thumbstat nobold nounderline">';
|
||||
$boxstatItem .= '<div class="boxstats">';
|
||||
$boxstatItem .= '<span class="boxstatstext" title="' . dol_escape_htmltag($text) . '">' . $text . '</span><br>';
|
||||
$boxstatItem .= '<span class="boxstatsindicator">' . img_object("", $board->picto, 'class="inline-block"') . ' ' . ($board->nb[$val] ? $board->nb[$val] : 0) . '</span>';
|
||||
$boxstatItem .= '</div>';
|
||||
$boxstatItem .= '</a>';
|
||||
|
||||
$boxstatItems[$val] = $boxstatItem;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($boxstatFromHook) || !empty($boxstatItems)) {
|
||||
$boxstat .= $boxstatFromHook;
|
||||
|
||||
if (is_array($boxstatItems) && count($boxstatItems) > 0) {
|
||||
$boxstat .= implode('', $boxstatItems);
|
||||
}
|
||||
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
|
||||
$boxstat .= '</td></tr>';
|
||||
$boxstat .= '</table>';
|
||||
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => '',
|
||||
'textnoformat' => $boxstat
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => '',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
*
|
||||
* @param array $head Array with properties of box title
|
||||
* @param array $contents Array with properties of box lines
|
||||
* @param int $nooutput No print, only return string
|
||||
* @return string
|
||||
*/
|
||||
public function showBox($head = null, $contents = null, $nooutput = 0)
|
||||
{
|
||||
return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||
}
|
||||
}
|
||||
@ -133,7 +133,7 @@ class box_factures_fourn extends ModeleBoxes
|
||||
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
//$thirdpartystatic->name_alias = $objp->name_alias;
|
||||
$thirdpartystatic->name_alias = $objp->name_alias;
|
||||
$thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
||||
$thirdpartystatic->fournisseur = $objp->fournisseur;
|
||||
|
||||
@ -130,7 +130,7 @@ class box_factures_fourn_imp extends ModeleBoxes
|
||||
|
||||
$thirdpartystatic->id = $objp->socid;
|
||||
$thirdpartystatic->name = $objp->name;
|
||||
//$thirdpartystatic->name_alias = $objp->name_alias;
|
||||
$thirdpartystatic->name_alias = $objp->name_alias;
|
||||
$thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
|
||||
$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
||||
$thirdpartystatic->fournisseur = $objp->fournisseur;
|
||||
|
||||
@ -63,7 +63,9 @@ class box_members extends ModeleBoxes
|
||||
|
||||
// disable module for such cases
|
||||
$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
||||
if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) $this->enabled = 0; // disabled for external users
|
||||
if (!in_array('adherent', $listofmodulesforexternal) && !empty($user->socid)) {
|
||||
$this->enabled = 0; // disabled for external users
|
||||
}
|
||||
|
||||
$this->hidden = !($user->rights->adherent->lire);
|
||||
}
|
||||
@ -87,7 +89,7 @@ class box_members extends ModeleBoxes
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleLastModifiedMembers", $max));
|
||||
|
||||
if ($user->rights->adherent->lire) {
|
||||
$sql = "SELECT a.rowid, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
|
||||
$sql = "SELECT a.rowid, a.ref, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
|
||||
$sql .= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,";
|
||||
$sql .= ' a.photo, a.email, a.gender, a.morphy,';
|
||||
$sql .= " t.subscription";
|
||||
@ -110,14 +112,15 @@ class box_members extends ModeleBoxes
|
||||
$memberstatic->lastname = $objp->lastname;
|
||||
$memberstatic->firstname = $objp->firstname;
|
||||
$memberstatic->id = $objp->rowid;
|
||||
$memberstatic->ref = $objp->rowid;
|
||||
$memberstatic->ref = $objp->ref;
|
||||
$memberstatic->photo = $objp->photo;
|
||||
$memberstatic->gender = $objp->gender;
|
||||
$memberstatic->email = $objp->email;
|
||||
$memberstatic->morphy = $objp->morphy;
|
||||
$memberstatic->company = $objp->company;
|
||||
$memberstatic->statut = $objp->status;
|
||||
|
||||
$memberstatic->need_subscription = $objp->subscription;
|
||||
$memberstatic->datefin = $this->db->jdate($objp->date_end_subscription);
|
||||
if (!empty($objp->fk_soc)) {
|
||||
$memberstatic->socid = $objp->fk_soc;
|
||||
$memberstatic->fetch_thirdparty();
|
||||
@ -151,11 +154,12 @@ class box_members extends ModeleBoxes
|
||||
$line++;
|
||||
}
|
||||
|
||||
if ($num == 0)
|
||||
if ($num == 0) {
|
||||
$this->info_box_contents[$line][0] = array(
|
||||
'td' => 'class="center"',
|
||||
'text'=>$langs->trans("NoRecordedCustomers"),
|
||||
);
|
||||
}
|
||||
|
||||
$this->db->free($result);
|
||||
} else {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3672,7 +3672,9 @@ abstract class CommonObject
|
||||
*/
|
||||
static public function getAllItemsLinkedByObjectID($fk_object_where, $field_select, $field_where, $table_element)
|
||||
{
|
||||
if (empty($fk_object_where) || empty($field_where) || empty($table_element)) return -1;
|
||||
if (empty($fk_object_where) || empty($field_where) || empty($table_element)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
global $db;
|
||||
|
||||
@ -3699,14 +3701,18 @@ abstract class CommonObject
|
||||
*/
|
||||
static public function deleteAllItemsLinkedByObjectID($fk_object_where, $field_where, $table_element)
|
||||
{
|
||||
if (empty($fk_object_where) || empty($field_where) || empty($table_element)) return -1;
|
||||
if (empty($fk_object_where) || empty($field_where) || empty($table_element)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
global $db;
|
||||
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table_element.' WHERE '.$field_where.' = '.$fk_object_where;
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if (empty($resql)) return 0;
|
||||
if (empty($resql)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -5998,8 +6004,14 @@ abstract class CommonObject
|
||||
} elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3] => 'N');
|
||||
$type = 'link';
|
||||
} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N');
|
||||
} elseif (preg_match('/^(sellist):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^(sellist):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[2].':'.$reg[3] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) {
|
||||
$param['options'] = array();
|
||||
@ -6166,24 +6178,20 @@ abstract class CommonObject
|
||||
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||
|
||||
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4]))
|
||||
{
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false)
|
||||
{
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||
if (strpos($InfoFieldList[4], 'extra.') !== false) {
|
||||
$keyList = 'main.'.$InfoFieldList[2].' as rowid';
|
||||
} else {
|
||||
$keyList = $InfoFieldList[2].' as rowid';
|
||||
}
|
||||
}
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3]))
|
||||
{
|
||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||
list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
|
||||
$keyList .= ', '.$parentField;
|
||||
}
|
||||
|
||||
$fields_label = explode('|', $InfoFieldList[1]);
|
||||
if (is_array($fields_label))
|
||||
{
|
||||
if (is_array($fields_label)) {
|
||||
$keyList .= ', ';
|
||||
$keyList .= implode(', ', $fields_label);
|
||||
}
|
||||
@ -6578,13 +6586,18 @@ abstract class CommonObject
|
||||
$param['options'] = array();
|
||||
|
||||
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) $param['options'] = $val['arrayofkeyval'];
|
||||
if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg))
|
||||
{
|
||||
if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$type = 'link';
|
||||
$param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]);
|
||||
} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^sellist:(.*):(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3] => 'N');
|
||||
$type = 'sellist';
|
||||
} elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) {
|
||||
$param['options'] = array($reg[1].':'.$reg[2] => 'N');
|
||||
$type = 'sellist';
|
||||
}
|
||||
|
||||
$langfile = $val['langfile'];
|
||||
@ -6675,8 +6688,7 @@ abstract class CommonObject
|
||||
$selectkey = "rowid";
|
||||
$keyList = 'rowid';
|
||||
|
||||
if (count($InfoFieldList) >= 3)
|
||||
{
|
||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||
$selectkey = $InfoFieldList[2];
|
||||
$keyList = $InfoFieldList[2].' as rowid';
|
||||
}
|
||||
|
||||
@ -634,13 +634,13 @@ class dolReceiptPrinter extends Printer
|
||||
if ($line->fk_product)
|
||||
{
|
||||
$spacestoadd = $nbcharactbyline - strlen($line->ref) - strlen($line->qty) - 10 - 1;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($line->ref.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
$this->printer->text(strip_tags(htmlspecialchars_decode($line->product_label))."\n");
|
||||
}
|
||||
else {
|
||||
$spacestoadd = $nbcharactbyline - strlen($line->description) - strlen($line->qty) - 10 - 1;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($line->description.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
}
|
||||
}
|
||||
@ -653,7 +653,7 @@ class dolReceiptPrinter extends Printer
|
||||
}
|
||||
foreach ($vatarray as $vatkey => $vatvalue) {
|
||||
$spacestoadd = $nbcharactbyline - strlen($vatkey) - 12;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($spaces.$vatkey.'% '.str_pad(price($vatvalue), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
}
|
||||
break;
|
||||
@ -680,15 +680,15 @@ class dolReceiptPrinter extends Printer
|
||||
case 'DOL_PRINT_OBJECT_TOTAL':
|
||||
$title = $langs->trans('TotalHT');
|
||||
$spacestoadd = $nbcharactbyline - strlen($title) - 10;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($title.$spaces.str_pad(price($object->total_ht), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
$title = $langs->trans('TotalVAT');
|
||||
$spacestoadd = $nbcharactbyline - strlen($title) - 10;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($title.$spaces.str_pad(price($object->total_tva), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
$title = $langs->trans('TotalTTC');
|
||||
$spacestoadd = $nbcharactbyline - strlen($title) - 10;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($title.$spaces.str_pad(price($object->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
break;
|
||||
case 'DOL_LINE_FEED':
|
||||
@ -778,7 +778,7 @@ class dolReceiptPrinter extends Printer
|
||||
if ($line->special_code == $this->orderprinter)
|
||||
{
|
||||
$spacestoadd = $nbcharactbyline - strlen($line->ref) - strlen($line->qty) - 10 - 1;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($line->ref.$spaces.$line->qty.' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
$this->printer->text(strip_tags(htmlspecialchars_decode($line->desc))."\n");
|
||||
}
|
||||
@ -799,14 +799,14 @@ class dolReceiptPrinter extends Printer
|
||||
while ($i < $num) {
|
||||
$row = $this->db->fetch_object($resql);
|
||||
$spacestoadd = $nbcharactbyline - strlen($langs->transnoentitiesnoconv("PaymentTypeShort".$row->code)) - 12;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$amount_payment = (!empty($conf->multicurrency->enabled) && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount;
|
||||
if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment
|
||||
$this->printer->text($spaces.$langs->transnoentitiesnoconv("PaymentTypeShort".$row->code).' '.str_pad(price($amount_payment), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
if ($row->code == "LIQ" && $row->pos_change > 0) // Print change only in cash payments
|
||||
{
|
||||
$spacestoadd = $nbcharactbyline - strlen($langs->trans("Change")) - 12;
|
||||
$spaces = str_repeat(' ', $spacestoadd);
|
||||
$spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0);
|
||||
$this->printer->text($spaces.$langs->trans("Change").' '.str_pad(price($row->pos_change), 10, ' ', STR_PAD_LEFT)."\n");
|
||||
}
|
||||
$i++;
|
||||
|
||||
@ -1028,13 +1028,12 @@ class ExtraFields
|
||||
// search filter on a date extrafield shows two inputs to select a date range
|
||||
$prefill = array(
|
||||
'start' => isset($value['start']) ? $value['start'] : '',
|
||||
'end' => isset($value['end']) ? $value['end'] : '');
|
||||
'end' => isset($value['end']) ? $value['end'] : ''
|
||||
);
|
||||
$out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">'
|
||||
. $langs->trans('From') . ' '
|
||||
. $form->selectDate($prefill['start'], $keyprefix . $key . $keysuffix . '_start', 0, 0, 1)
|
||||
. $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"))
|
||||
. '</div><div class="nowrap">'
|
||||
. $langs->trans('to') . ' '
|
||||
. $form->selectDate($prefill['end'], $keyprefix . $key . $keysuffix . '_end', 0, 0, 1)
|
||||
. $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"))
|
||||
. '</div></div>';
|
||||
} else {
|
||||
// TODO Must also support $moreparam
|
||||
|
||||
@ -1949,7 +1949,7 @@ class Form
|
||||
* @param string $nooutput No print, return the output into a string
|
||||
* @return void|string
|
||||
*/
|
||||
public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array(), $nooutput = 0)
|
||||
public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array(), $nooutput = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $conf;
|
||||
@ -4052,8 +4052,7 @@ class Form
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($result);
|
||||
if ($selected == $obj->rowid || ($useempty == 2 && $num == 1 && empty($selected)))
|
||||
{
|
||||
if ($selected == $obj->rowid || ($useempty == 2 && $num == 1 && empty($selected))) {
|
||||
$out .= '<option value="'.$obj->rowid.'" selected>';
|
||||
} else {
|
||||
$out .= '<option value="'.$obj->rowid.'">';
|
||||
@ -4495,10 +4494,15 @@ class Form
|
||||
if (inputok.length>0) {
|
||||
$.each(inputok, function(i, inputname) {
|
||||
var more = "";
|
||||
if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; }
|
||||
if ($("#" + inputname).attr("type") == "radio") { more = ":checked"; }
|
||||
var inputvalue = $("#" + inputname + more).val();
|
||||
var inputvalue;
|
||||
if ($("input[name=\'" + inputname + "\']").attr("type") == "radio") {
|
||||
inputvalue = $("input[name=\'" + inputname + "\']").val();
|
||||
} else {
|
||||
if ($("#" + inputname).attr("type") == "checkbox") { more = ":checked"; }
|
||||
inputvalue = $("#" + inputname + more).val();
|
||||
}
|
||||
if (typeof inputvalue == "undefined") { inputvalue=""; }
|
||||
console.log("check inputname="+inputname+" inputvalue="+inputvalue);
|
||||
options += "&" + inputname + "=" + encodeURIComponent(inputvalue);
|
||||
});
|
||||
}
|
||||
@ -5707,14 +5711,17 @@ class Form
|
||||
$retstring .= ' onChange="dpChangeDay(\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
|
||||
$retstring .= '>';
|
||||
|
||||
// Icone calendrier
|
||||
if (!$disabled)
|
||||
{
|
||||
$retstring .= '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
||||
// Icone calendar
|
||||
$retstringbuttom = '';
|
||||
if (!$disabled) {
|
||||
$retstringbuttom = '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons"';
|
||||
$base = DOL_URL_ROOT.'/core/';
|
||||
$retstring .= ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\',\''.$langs->defaultlang.'\');"';
|
||||
$retstring .= '>'.img_object($langs->trans("SelectDate"), 'calendarday', 'class="datecallink"').'</button>';
|
||||
} else $retstring .= '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons">'.img_object($langs->trans("Disabled"), 'calendarday', 'class="datecallink"').'</button>';
|
||||
$retstringbuttom .= ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\',\''.$langs->defaultlang.'\');"';
|
||||
$retstringbuttom .= '>'.img_object($langs->trans("SelectDate"), 'calendarday', 'class="datecallink"').'</button>';
|
||||
} else {
|
||||
$retstringbuttom = '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons">'.img_object($langs->trans("Disabled"), 'calendarday', 'class="datecallink"').'</button>';
|
||||
}
|
||||
$retstring = $retstringbuttom.$retstring;
|
||||
|
||||
$retstring .= '<input type="hidden" id="'.$prefix.'day" name="'.$prefix.'day" value="'.$sday.'">'."\n";
|
||||
$retstring .= '<input type="hidden" id="'.$prefix.'month" name="'.$prefix.'month" value="'.$smonth.'">'."\n";
|
||||
@ -5744,7 +5751,7 @@ class Form
|
||||
if (empty($conf->global->MAIN_POPUP_CALENDAR_ON_FOCUS))
|
||||
{
|
||||
$retstring .= "
|
||||
showOn: 'button',
|
||||
showOn: 'button', /* both has problem with autocompletion */
|
||||
buttonImage: '".DOL_URL_ROOT."/theme/".$conf->theme."/img/object_calendarday.png',
|
||||
buttonImageOnly: true";
|
||||
}
|
||||
@ -5754,10 +5761,10 @@ class Form
|
||||
}
|
||||
|
||||
// Zone de saisie manuelle de la date
|
||||
$retstring .= '<div class="nowrap inline-block">';
|
||||
$retstring .= '<div class="nowrap inline-block divfordateinput">';
|
||||
$retstring .= '<input id="'.$prefix.'" name="'.$prefix.'" type="text" class="maxwidthdate" maxlength="11" value="'.$formated_date.'"';
|
||||
$retstring .= ($disabled ? ' disabled' : '');
|
||||
$retstring .= ($placeholder ? ' placeholder="'.$placeholder.'"' : '');
|
||||
$retstring .= ($placeholder ? ' placeholder="'.dol_escape_htmltag($placeholder).'"' : '');
|
||||
$retstring .= ' onChange="dpChangeDay(\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
|
||||
$retstring .= '>';
|
||||
|
||||
@ -5774,7 +5781,8 @@ class Form
|
||||
$retstring.='});';
|
||||
$retstring.="</script>";*/
|
||||
} else {
|
||||
$retstring .= '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons">'.img_object($langs->trans("Disabled"), 'calendarday', 'class="datecallink"').'</button>';
|
||||
$retstringbutton = '<button id="'.$prefix.'Button" type="button" class="dpInvisibleButtons">'.img_object($langs->trans("Disabled"), 'calendarday', 'class="datecallink"').'</button>';
|
||||
$retsring = $retstringbutton.$retstring;
|
||||
}
|
||||
|
||||
$retstring .= '</div>';
|
||||
@ -6789,8 +6797,8 @@ class Form
|
||||
|
||||
// Add code for jquery to use multiselect
|
||||
if (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) {
|
||||
$out .= "\n".'<!-- JS CODE TO ENABLE select for id '.$htmlname.' -->
|
||||
<script>'."\n";
|
||||
$out .= "\n".'<!-- JS CODE TO ENABLE select for id '.$htmlname.', addjscombo='.$addjscombo.' -->';
|
||||
$out .= "\n".'<script>'."\n";
|
||||
if ($addjscombo == 1) {
|
||||
$tmpplugin = empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) ?constant('REQUIRE_JQUERY_MULTISELECT') : $conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||
$out .= 'function formatResult(record) {'."\n";
|
||||
@ -6817,6 +6825,10 @@ class Form
|
||||
formatSelection: formatSelection,
|
||||
templateSelection: formatSelection /* For 4.0 */
|
||||
});
|
||||
|
||||
/* Add also morecss to the css .select2 that is after the #htmlname, for component that are show dynamically after load, because select2 set
|
||||
the size only if component is not hidden by default on load */
|
||||
$(\'#'.$htmlname.' + .select2\').addClass(\''.$morecss.'\');
|
||||
});'."\n";
|
||||
} elseif ($addjscombo == 2 && !defined('DISABLE_MULTISELECT')) {
|
||||
// Add other js lib
|
||||
|
||||
@ -435,24 +435,27 @@ class FormAccounting extends Form
|
||||
* @param string $morecss More css
|
||||
* @return string String with HTML select
|
||||
*/
|
||||
public function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $morecss = 'maxwidth200')
|
||||
public function select_auxaccount($selectid, $htmlname = 'account_num_aux', $showempty = 0, $morecss = 'maxwidth250')
|
||||
{
|
||||
// phpcs:enable
|
||||
|
||||
$aux_account = array();
|
||||
|
||||
// Auxiliary customer account
|
||||
$sql = "SELECT DISTINCT code_compta, nom ";
|
||||
// Auxiliary thirdparties account
|
||||
$sql = "SELECT code_compta, code_compta_fournisseur, nom as name";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
|
||||
$sql .= " WHERE entity IN (".getEntity('societe').")";
|
||||
$sql .= " ORDER BY code_compta";
|
||||
$sql .= " AND client IN (1,3) OR fournisseur = 1";
|
||||
|
||||
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
if (!empty($obj->code_compta)) {
|
||||
$aux_account[$obj->code_compta] = $obj->code_compta.' <span class="opacitymedium">('.$obj->nom.')</span>';
|
||||
$aux_account[$obj->code_compta] = $obj->code_compta.' <span class="opacitymedium">('.$obj->name.')</span>';
|
||||
}
|
||||
if (!empty($obj->code_compta_fournisseur)) {
|
||||
$aux_account[$obj->code_compta_fournisseur] = $obj->code_compta_fournisseur.' <span class="opacitymedium">('.$obj->name.')</span>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -460,26 +463,9 @@ class FormAccounting extends Form
|
||||
dol_syslog(get_class($this)."::select_auxaccount ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
// Auxiliary supplier account
|
||||
$sql = "SELECT DISTINCT code_compta_fournisseur, nom ";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."societe";
|
||||
$sql .= " WHERE entity IN (".getEntity('societe').")";
|
||||
$sql .= " ORDER BY code_compta_fournisseur";
|
||||
dol_syslog(get_class($this)."::select_auxaccount", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $this->db->fetch_object($resql)) {
|
||||
if ($obj->code_compta_fournisseur != "") {
|
||||
$aux_account[$obj->code_compta_fournisseur] = $obj->code_compta_fournisseur.' <span class="opacitymedium">('.$obj->nom.')</span>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::select_auxaccount ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
ksort($aux_account);
|
||||
|
||||
$this->db->free($resql);
|
||||
|
||||
// Auxiliary user account
|
||||
|
||||
@ -1066,7 +1066,8 @@ class FormFile
|
||||
if ($disablecrop == -1)
|
||||
{
|
||||
$disablecrop = 1;
|
||||
if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'holiday', 'medias', 'member', 'mrp', 'project', 'product', 'produit', 'propal', 'service', 'societe', 'tax', 'tax-vat', 'ticket', 'user'))) $disablecrop = 0;
|
||||
// Values here must be supported by the photo_resize.php page.
|
||||
if (in_array($modulepart, array('bank', 'bom', 'expensereport', 'facture', 'facture_fournisseur', 'holiday', 'medias', 'member', 'mrp', 'project', 'product', 'produit', 'propal', 'service', 'societe', 'tax', 'tax-vat', 'ticket', 'user'))) $disablecrop = 0;
|
||||
}
|
||||
|
||||
// Define relative path used to store the file
|
||||
|
||||
@ -855,9 +855,16 @@ class FormMail extends Form
|
||||
$out .= '</script>'."\n";
|
||||
if (count($listofpaths)) {
|
||||
foreach ($listofpaths as $key => $val) {
|
||||
$relativepathtofile = substr($val, (strlen(DOL_DATA_ROOT) - strlen($val)));
|
||||
if ($conf->entity > 1) {
|
||||
$relativepathtofile = str_replace($conf->entity.'/', '', $relativepathtofile);
|
||||
}
|
||||
// Try to extract data from full path
|
||||
$formfile_params = array();
|
||||
preg_match('#^(/)(\w+)(/)(.+)$#', $relativepathtofile, $formfile_params);
|
||||
|
||||
$out .= '<div id="attachfile_'.$key.'">';
|
||||
// Preview of attachment
|
||||
preg_match('#^(/)(\w+)(/)(.+)$#', substr($val, (strlen(DOL_DATA_ROOT) - strlen($val))), $formfile_params);
|
||||
$out .= img_mime($listofnames[$key]).' '.$listofnames[$key];
|
||||
$out .= $formfile->showPreview(array(), $formfile_params[2], $formfile_params[4]);
|
||||
if (!$this->withfilereadonly) {
|
||||
@ -1132,7 +1139,7 @@ class FormMail extends Form
|
||||
}
|
||||
|
||||
/**
|
||||
* get Html For Asking for Deliveriy Receipt
|
||||
* get Html For Asking for Delivery Receipt
|
||||
*
|
||||
* @return string html
|
||||
*/
|
||||
@ -1445,7 +1452,9 @@ class FormMail extends Form
|
||||
|
||||
// Create dynamic tags for __PRODUCT_EXTRAFIELD_FIELD__
|
||||
if (!empty($line->fk_product)) {
|
||||
if (!is_object($extrafields)) $extrafields = new ExtraFields($this->db);
|
||||
if (!is_object($extrafields)) {
|
||||
$extrafields = new ExtraFields($this->db);
|
||||
}
|
||||
$extrafields->fetch_name_optionals_label('product', true);
|
||||
$product = new Product($this->db);
|
||||
$product->fetch($line->fk_product, '', '', 1);
|
||||
@ -1509,9 +1518,15 @@ class FormMail extends Form
|
||||
//,'__PERSONALIZED__' => 'Personalized' // Hidden because not used yet in mass emailing
|
||||
|
||||
$onlinepaymentenabled = 0;
|
||||
if (!empty($conf->paypal->enabled)) $onlinepaymentenabled++;
|
||||
if (!empty($conf->paybox->enabled)) $onlinepaymentenabled++;
|
||||
if (!empty($conf->stripe->enabled)) $onlinepaymentenabled++;
|
||||
if (!empty($conf->paypal->enabled)) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if (!empty($conf->paybox->enabled)) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if (!empty($conf->stripe->enabled)) {
|
||||
$onlinepaymentenabled++;
|
||||
}
|
||||
if ($onlinepaymentenabled && !empty($conf->global->PAYMENT_SECURITY_TOKEN)) {
|
||||
$tmparray['__SECUREKEYPAYMENT__'] = $conf->global->PAYMENT_SECURITY_TOKEN;
|
||||
if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) {
|
||||
@ -1540,7 +1555,9 @@ class FormMail extends Form
|
||||
}
|
||||
|
||||
foreach ($tmparray as $key => $val) {
|
||||
if (empty($val)) $tmparray[$key] = $key;
|
||||
if (empty($val)) {
|
||||
$tmparray[$key] = $key;
|
||||
}
|
||||
}
|
||||
|
||||
return $tmparray;
|
||||
|
||||
@ -352,7 +352,7 @@ class FormProjets
|
||||
if (empty($option_only) && !empty($conf->use_javascript_ajax))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
|
||||
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
|
||||
$out .= $comboenhancement;
|
||||
$morecss = 'minwidth200 maxwidth500';
|
||||
}
|
||||
@ -388,7 +388,7 @@ class FormProjets
|
||||
continue;
|
||||
}
|
||||
|
||||
$labeltoshow = '';
|
||||
$labeltoshow = ''; $titletoshow = '';
|
||||
|
||||
$disabled = 0;
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||
@ -408,32 +408,39 @@ class FormProjets
|
||||
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("SharedProject").')';
|
||||
//else $labeltoshow.=' ('.$langs->trans("Private").')';
|
||||
$labeltoshow .= ' '.dol_trunc($obj->title, $maxlength);
|
||||
$titletoshow = $labeltoshow;
|
||||
|
||||
if ($obj->name) $labeltoshow .= ' ('.$obj->name.')';
|
||||
if ($obj->name) {
|
||||
$labeltoshow .= ' ('.$obj->name.')';
|
||||
$titletoshow .= ' <span class="opacitymedium">('.$obj->name.')</span>';
|
||||
}
|
||||
|
||||
$disabled = 0;
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT)
|
||||
{
|
||||
if ($obj->fk_statut == Project::STATUS_DRAFT) {
|
||||
$disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("Draft");
|
||||
} elseif ($obj->fk_statut == Project::STATUS_CLOSED)
|
||||
{
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("Draft").'</span>';
|
||||
} elseif ($obj->fk_statut == Project::STATUS_CLOSED) {
|
||||
if ($discard_closed == 2) $disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("Closed");
|
||||
} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
||||
{
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("Closed").'</span>';
|
||||
} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) {
|
||||
$disabled = 1;
|
||||
$labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany");
|
||||
$titletoshow .= ' - <span class="opacitymedium">'.$langs->trans("LinkedToAnotherCompany").'</span>';
|
||||
}
|
||||
$labeltoshow .= ' - ';
|
||||
$titletoshow .= ' - ';
|
||||
}
|
||||
|
||||
// Label for task
|
||||
$labeltoshow .= $obj->tref.' '.dol_trunc($obj->tlabel, $maxlength);
|
||||
$titletoshow .= $obj->tref.' '.dol_trunc($obj->tlabel, $maxlength);
|
||||
|
||||
if (!empty($selected) && $selected == $obj->rowid)
|
||||
{
|
||||
$out .= '<option value="'.$obj->rowid.'" selected';
|
||||
$out .= ' data-html="'.dol_escape_htmltag($titletoshow).'"';
|
||||
//if ($disabled) $out.=' disabled'; // with select2, field can't be preselected if disabled
|
||||
$out .= '>'.$labeltoshow.'</option>';
|
||||
} else {
|
||||
@ -445,6 +452,7 @@ class FormProjets
|
||||
if ($disabled) $resultat .= ' disabled';
|
||||
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')';
|
||||
//else $labeltoshow.=' ('.$langs->trans("Private").')';
|
||||
$resultat .= ' data-html="'.dol_escape_htmltag($titletoshow).'"';
|
||||
$resultat .= '>';
|
||||
$resultat .= $labeltoshow;
|
||||
$resultat .= '</option>';
|
||||
|
||||
@ -37,8 +37,7 @@ class InfoBox
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (empty($conf->global->MAIN_FEATURES_LEVEL) || $conf->global->MAIN_FEATURES_LEVEL < 2)
|
||||
{
|
||||
if (empty($conf->global->MAIN_FEATURES_LEVEL) || $conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
return array(
|
||||
0 => 'Home',
|
||||
27 => 'AccountancyHome'
|
||||
@ -95,20 +94,22 @@ class InfoBox
|
||||
$boxes = array();
|
||||
|
||||
$confuserzone = 'MAIN_BOXES_'.$zone;
|
||||
if ($mode == 'activated') // activated
|
||||
{
|
||||
if ($mode == 'activated') { // activated
|
||||
$sql = "SELECT b.rowid, b.position, b.box_order, b.fk_user,";
|
||||
$sql .= " d.rowid as box_id, d.file, d.note, d.tms";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."boxes as b, ".MAIN_DB_PREFIX."boxes_def as d";
|
||||
$sql .= " WHERE b.box_id = d.rowid";
|
||||
$sql .= " AND b.entity IN (0,".$conf->entity.")";
|
||||
if ($zone >= 0) $sql .= " AND b.position = ".$zone;
|
||||
if (is_object($user)) $sql .= " AND b.fk_user IN (0,".$user->id.")";
|
||||
else $sql .= " AND b.fk_user = 0";
|
||||
if ($zone >= 0) {
|
||||
$sql .= " AND b.position = ".$zone;
|
||||
}
|
||||
if (is_object($user)) {
|
||||
$sql .= " AND b.fk_user IN (0,".$user->id.")";
|
||||
} else {
|
||||
$sql .= " AND b.fk_user = 0";
|
||||
}
|
||||
$sql .= " ORDER BY b.box_order";
|
||||
}
|
||||
else // available
|
||||
{
|
||||
} else { // available
|
||||
$sql = "SELECT d.rowid as box_id, d.file, d.note, d.tms";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."boxes_def as d";
|
||||
$sql .= " WHERE d.entity IN (0,".$conf->entity.")";
|
||||
@ -116,19 +117,15 @@ class InfoBox
|
||||
|
||||
dol_syslog(get_class()."::listBoxes get default box list for mode=".$mode." userid=".(is_object($user) ? $user->id : '')."", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$j = 0;
|
||||
while ($j < $num)
|
||||
{
|
||||
while ($j < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
if (!in_array($obj->box_id, $excludelist))
|
||||
{
|
||||
if (!in_array($obj->box_id, $excludelist)) {
|
||||
$regs = array();
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $obj->file, $regs))
|
||||
{
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i', $obj->file, $regs)) {
|
||||
$boxname = preg_replace('/\.php$/i', '', $regs[1]);
|
||||
$module = $regs[2];
|
||||
$relsourcefile = "/".$module."/core/boxes/".$boxname.".php";
|
||||
@ -143,8 +140,7 @@ class InfoBox
|
||||
// the "enabled" condition for modules forbidden for external users and the depends condition can be done.
|
||||
// Goal is to avoid making a "new" done for each boxes returned by select.
|
||||
dol_include_once($relsourcefile);
|
||||
if (class_exists($boxname))
|
||||
{
|
||||
if (class_exists($boxname)) {
|
||||
$box = new $boxname($db, $obj->note); // Constructor may set properties like box->enabled. obj->note is note into box def, not user params.
|
||||
//$box=new stdClass();
|
||||
|
||||
@ -159,8 +155,7 @@ class InfoBox
|
||||
|
||||
if ($mode == 'activated' && !is_object($user)) // List of activated box was not yet personalized into database
|
||||
{
|
||||
if (is_numeric($box->box_order))
|
||||
{
|
||||
if (is_numeric($box->box_order)) {
|
||||
if ($box->box_order % 2 == 1) $box->box_order = 'A'.$box->box_order;
|
||||
elseif ($box->box_order % 2 == 0) $box->box_order = 'B'.$box->box_order;
|
||||
}
|
||||
@ -172,14 +167,11 @@ class InfoBox
|
||||
// Filter on box->enabled (used for example by box_comptes)
|
||||
// Filter also on box->depends. Example: array("product|service") or array("contrat", "service")
|
||||
$enabled = $box->enabled;
|
||||
if (isset($box->depends) && count($box->depends) > 0)
|
||||
{
|
||||
foreach ($box->depends as $moduleelem)
|
||||
{
|
||||
if (isset($box->depends) && count($box->depends) > 0) {
|
||||
foreach ($box->depends as $moduleelem) {
|
||||
$arrayelem = explode('|', $moduleelem);
|
||||
$tmpenabled = 0; // $tmpenabled is used for the '|' test (OR)
|
||||
foreach ($arrayelem as $module)
|
||||
{
|
||||
foreach ($arrayelem as $module) {
|
||||
$tmpmodule = preg_replace('/@[^@]+/', '', $module);
|
||||
if (!empty($conf->$tmpmodule->enabled)) $tmpenabled = 1;
|
||||
//print $boxname.'-'.$module.'-module enabled='.(empty($conf->$tmpmodule->enabled)?0:1).'<br>';
|
||||
@ -241,8 +233,7 @@ class InfoBox
|
||||
$tab = array();
|
||||
$confuserzone = 'MAIN_BOXES_'.$zone;
|
||||
$tab[$confuserzone] = 1;
|
||||
if (dol_set_user_param($db, $conf, $user, $tab) < 0)
|
||||
{
|
||||
if (dol_set_user_param($db, $conf, $user, $tab) < 0) {
|
||||
$error = $db->lasterror();
|
||||
$db->rollback();
|
||||
return -3;
|
||||
@ -288,8 +279,7 @@ class InfoBox
|
||||
|
||||
dol_syslog(get_class()."::saveboxorder", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result < 0)
|
||||
{
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -179,20 +179,29 @@ class Interfaces
|
||||
$objMod = new $modName($this->db);
|
||||
if ($objMod)
|
||||
{
|
||||
$dblevelbefore = $this->db->transaction_opened;
|
||||
|
||||
$result = 0;
|
||||
|
||||
if (method_exists($objMod, 'runTrigger')) // New method to implement
|
||||
{
|
||||
if (method_exists($objMod, 'runTrigger')) { // New method to implement
|
||||
//dol_syslog(get_class($this)."::run_triggers action=".$action." Launch runTrigger for file '".$files[$key]."'", LOG_DEBUG);
|
||||
$result = $objMod->runTrigger($action, $object, $user, $langs, $conf);
|
||||
} elseif (method_exists($objMod, 'run_trigger')) // Deprecated method
|
||||
{
|
||||
} elseif (method_exists($objMod, 'run_trigger')) { // Deprecated method
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Launch old method run_trigger (rename your trigger into runTrigger) for file '".$files[$key]."'", LOG_WARNING);
|
||||
$result = $objMod->run_trigger($action, $object, $user, $langs, $conf);
|
||||
} else {
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." A trigger was declared for class ".get_class($objMod)." but method runTrigger was not found", LOG_ERR);
|
||||
}
|
||||
|
||||
$dblevelafter = $this->db->transaction_opened;
|
||||
|
||||
if ($dblevelbefore != $dblevelafter) {
|
||||
$errormessage = "Error, the balance begin/close of db transactions has been broken into trigger ".$modName." with action=".$action." before=".$dblevelbefore." after=".$dblevelafter;
|
||||
$this->errors[] = $errormessage;
|
||||
dol_syslog($errormessage, LOG_ERR);
|
||||
$result = -1;
|
||||
}
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
// Action OK
|
||||
|
||||
@ -290,7 +290,7 @@ class Utils
|
||||
if (!empty($dolibarr_main_db_pass))
|
||||
{
|
||||
$paramcrypted .= ' -p"'.preg_replace('/./i', '*', $dolibarr_main_db_pass).'"';
|
||||
$paramclear .= ' -p"'.str_replace(array('"', '`'), array('\"', '\`'), $dolibarr_main_db_pass).'"';
|
||||
$paramclear .= ' -p"'.str_replace(array('"', '`', '$'), array('\"', '\`', '\$'), $dolibarr_main_db_pass).'"';
|
||||
}
|
||||
|
||||
$handle = '';
|
||||
|
||||
@ -65,7 +65,7 @@ print "jQuery(document).ready(function () {\n";
|
||||
|
||||
if (empty($conf->dol_no_mouse_hover)) {
|
||||
print 'jQuery(".classfortooltip").tooltip({
|
||||
show: { collision: "flipfit", effect:"toggle", delay:75, duration:150 },
|
||||
show: { collision: "flipfit", effect:"toggle", delay:50, duration: 20 },
|
||||
hide: { delay: 250, duration: 20 },
|
||||
tooltipClass: "mytooltip",
|
||||
content: function () {
|
||||
|
||||
@ -672,25 +672,25 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
||||
if (preg_match('/[^a-z0-9_\-\.,]+/i', $out)) $out = '';
|
||||
}
|
||||
break;
|
||||
case 'nohtml':
|
||||
case 'nohtml': // No html
|
||||
$out = dol_string_nohtmltag($out, 0);
|
||||
break;
|
||||
case 'alpha': // No html and no ../ and " replaced with ''
|
||||
case 'alpha': // No html and no ../ and "
|
||||
case 'alphanohtml': // Recommended for most scalar parameters and search parameters
|
||||
if (!is_array($out)) {
|
||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||
// '../' is dangerous because it allows dir transversals
|
||||
$out = str_replace(array('"', '"'), "''", trim($out));
|
||||
$out = str_replace(array('"', '"'), '', trim($out));
|
||||
$out = str_replace(array('../'), '', $out);
|
||||
// keep lines feed
|
||||
$out = dol_string_nohtmltag($out, 0);
|
||||
}
|
||||
break;
|
||||
case 'alphawithlgt': // No " and no ../ but we keep < > tags
|
||||
case 'alphawithlgt': // No " and no ../ but we keep < > tags. Can be used for email string like "Name <email>"
|
||||
if (!is_array($out)) {
|
||||
// '"' is dangerous because param in url can close the href= or src= and add javascript functions.
|
||||
// '../' is dangerous because it allows dir transversals
|
||||
$out = str_replace(array('"', '"'), "", trim($out));
|
||||
$out = str_replace(array('"', '"'), '', trim($out));
|
||||
$out = str_replace(array('../'), '', $out);
|
||||
}
|
||||
break;
|
||||
@ -3268,7 +3268,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'lot',
|
||||
'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next',
|
||||
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
|
||||
'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label',
|
||||
@ -4863,7 +4863,7 @@ function price2num($amount, $rounding = '', $option = 0)
|
||||
if ($option != 1) { // If not a PHP number or unknown, we change or clean format
|
||||
//print 'PP'.$amount.' - '.$dec.' - '.$thousand.' - '.intval($amount).'<br>';
|
||||
if (!is_numeric($amount)) {
|
||||
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>]/', '', $amount);
|
||||
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>\_]/', '', $amount);
|
||||
}
|
||||
|
||||
if ($option == 2 && $thousand == '.' && preg_match('/\.(\d\d\d)$/', (string) $amount)) { // It means the . is used as a thousand separator and string come frominput data, so 1.123 is 1123
|
||||
@ -5488,6 +5488,10 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
|
||||
$isacompany = $thirdparty_buyer->isACompany();
|
||||
if ($isacompany)
|
||||
{
|
||||
if (!empty($conf->global->MAIN_USE_VAT_OF_PRODUCT_FOR_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID) && !isValidVATID($thirdparty_buyer)) {
|
||||
//print 'VATRULE 6';
|
||||
return get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice);
|
||||
}
|
||||
//print 'VATRULE 3';
|
||||
return 0;
|
||||
} else {
|
||||
|
||||
@ -476,6 +476,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->usage_bill_time = $lines[$i]->usage_bill_time;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = $lines[$i]->ref;
|
||||
@ -881,6 +882,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
$projectstatic->ref = $lines[$i]->project_ref;
|
||||
$projectstatic->title = $lines[$i]->project_label;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->status = $lines[$i]->project_status;
|
||||
|
||||
$taskstatic->id = $lines[$i]->task_id;
|
||||
$taskstatic->ref = ($lines[$i]->task_ref ? $lines[$i]->task_ref : $lines[$i]->task_id);
|
||||
@ -1843,6 +1845,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
||||
$projectstatic->title = $lines[$i]->projectlabel;
|
||||
$projectstatic->public = $lines[$i]->public;
|
||||
$projectstatic->thirdparty_name = $lines[$i]->thirdparty_name;
|
||||
$projectstatic->status = $lines[$i]->projectstatus;
|
||||
|
||||
$taskstatic->id = $lines[$i]->id;
|
||||
$taskstatic->ref = ($lines[$i]->ref ? $lines[$i]->ref : $lines[$i]->id);
|
||||
|
||||
@ -78,7 +78,8 @@ class modUser extends DolibarrModules
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0=>array('file'=>'box_lastlogin.php', 'enabledbydefaulton'=>'Home'),
|
||||
1=>array('file'=>'box_birthdays.php', 'enabledbydefaulton'=>'Home')
|
||||
1=>array('file'=>'box_birthdays.php', 'enabledbydefaulton'=>'Home'),
|
||||
2=>array('file'=>'box_dolibarr_state_board.php', 'enabledbydefaulton'=>'Home')
|
||||
);
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -42,6 +42,7 @@ $file = GETPOST('file', 'alpha');
|
||||
$num = GETPOST('num', 'alpha'); // Used for document on bank statement
|
||||
$website = GETPOST('website', 'alpha');
|
||||
|
||||
|
||||
// Security check
|
||||
if (empty($modulepart)) accessforbidden('Bad value for modulepart');
|
||||
$accessallowed = 0;
|
||||
@ -85,6 +86,11 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv
|
||||
$permtoadd = ($user->rights->mailing->creer || $user->rights->website->write);
|
||||
if (!$permtoadd) accessforbidden();
|
||||
$accessallowed = 1;
|
||||
} elseif ($modulepart == 'facture_fourn' || $modulepart == 'facture_fournisseur')
|
||||
{
|
||||
$result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
|
||||
if (!$user->rights->fournisseur->facture->lire) accessforbidden();
|
||||
$accessallowed = 1;
|
||||
} else // ticket, holiday, expensereport, societe...
|
||||
{
|
||||
$result = restrictedArea($user, $modulepart, $id, $modulepart);
|
||||
@ -230,10 +236,28 @@ if ($modulepart == 'produit' || $modulepart == 'product' || $modulepart == 'serv
|
||||
if ($result <= 0) dol_print_error($db, 'Failed to load object');
|
||||
$dir = $conf->bank->dir_output; // By default
|
||||
}
|
||||
} elseif ($modulepart == 'facture') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
$object = new Facture($db);
|
||||
if ($id > 0)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
if ($result <= 0) dol_print_error($db, 'Failed to load object');
|
||||
$dir = $conf->$modulepart->dir_output; // By default
|
||||
}
|
||||
} elseif ($modulepart == 'facture_fourn' || $modulepart == 'facture_fournisseur') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
$object = new FactureFournisseur($db);
|
||||
if ($id > 0)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
if ($result <= 0) dol_print_error($db, 'Failed to load object');
|
||||
$dir = $conf->fournisseur->dir_output.'/facture'; // By default
|
||||
}
|
||||
} elseif ($modulepart == 'medias') {
|
||||
$dir = $dolibarr_main_data_root.'/'.$modulepart;
|
||||
} else {
|
||||
print 'Action crop for modulepart = '.$modulepart.' is not supported yet by photos_resize.php.';
|
||||
print 'Bug: Action crop for modulepart = '.$modulepart.' is not supported yet by photos_resize.php.';
|
||||
}
|
||||
|
||||
if (empty($backtourl))
|
||||
@ -250,6 +274,8 @@ if (empty($backtourl))
|
||||
elseif (in_array($modulepart, array('tax'))) $backtourl = DOL_URL_ROOT."/compta/sociales/document.php?id=".$id.'&file='.urldecode($file);
|
||||
elseif (in_array($modulepart, array('ticket'))) $backtourl = DOL_URL_ROOT."/ticket/document.php?id=".$id.'&file='.urldecode($file);
|
||||
elseif (in_array($modulepart, array('user'))) $backtourl = DOL_URL_ROOT."/user/document.php?id=".$id.'&file='.urldecode($file);
|
||||
elseif (in_array($modulepart, array('facture'))) $backtourl = DOL_URL_ROOT."/compta/facture/document.php?id=".$id.'&file='.urldecode($file);
|
||||
elseif (in_array($modulepart, array('facture_fourn', 'facture_fournisseur'))) $backtourl = DOL_URL_ROOT."/fourn/facture/document.php?id=".$id.'&file='.urldecode($file);
|
||||
elseif (in_array($modulepart, array('bank')) && preg_match('/\/statement\/([^\/]+)\//', $file, $regs)) {
|
||||
$num = $regs[1];
|
||||
$backtourl = DOL_URL_ROOT."/compta/bank/account_statement_document.php?id=".$id.'&num='.urlencode($num).'&file='.urldecode($file);
|
||||
@ -269,10 +295,8 @@ if (empty($backtourl))
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($backtourl)
|
||||
{
|
||||
if ($cancel) {
|
||||
if ($backtourl) {
|
||||
header("Location: ".$backtourl);
|
||||
exit;
|
||||
} else {
|
||||
@ -283,6 +307,10 @@ if ($cancel)
|
||||
|
||||
if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey"))
|
||||
{
|
||||
if (empty($dir)) {
|
||||
print 'Bug: Value for $dir could not be defined.';
|
||||
}
|
||||
|
||||
$fullpath = $dir."/".$original_file;
|
||||
|
||||
$result = dol_imageResizeOrCrop($fullpath, 0, GETPOST('sizex', 'int'), GETPOST('sizey', 'int'));
|
||||
@ -350,9 +378,13 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex")
|
||||
// Crop d'une image
|
||||
if ($action == 'confirm_crop')
|
||||
{
|
||||
if (empty($dir)) {
|
||||
print 'Bug: Value for $dir could not be defined.';
|
||||
}
|
||||
|
||||
$fullpath = $dir."/".$original_file;
|
||||
|
||||
//var_dump($_POST['w'].'x'.$_POST['h'].'-'.$_POST['x'].'x'.$_POST['y']);exit;
|
||||
//var_dump($fullpath.' '.$_POST['w'].'x'.$_POST['h'].'-'.$_POST['x'].'x'.$_POST['y']);exit;
|
||||
$result = dol_imageResizeOrCrop($fullpath, 1, GETPOST('w', 'int'), GETPOST('h', 'int'), GETPOST('x', 'int'), GETPOST('y', 'int'));
|
||||
|
||||
if ($result == $fullpath)
|
||||
@ -399,8 +431,7 @@ if ($action == 'confirm_crop')
|
||||
$result = $ecmfile->create($user);
|
||||
}
|
||||
|
||||
if ($backtourl)
|
||||
{
|
||||
if ($backtourl) {
|
||||
header("Location: ".$backtourl);
|
||||
exit;
|
||||
} else {
|
||||
@ -419,10 +450,12 @@ if ($action == 'confirm_crop')
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader($head, $langs->trans("Image"), '', '', 0, 0, array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'), array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'));
|
||||
$title= $langs->trans("ImageEditor");
|
||||
|
||||
llxHeader($head, $title, '', '', 0, 0, array('/includes/jquery/plugins/jcrop/js/jquery.Jcrop.min.js', '/core/js/lib_photosresize.js'), array('/includes/jquery/plugins/jcrop/css/jquery.Jcrop.css'));
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("ImageEditor"));
|
||||
print load_fiche_titre($title);
|
||||
|
||||
$infoarray = dol_getImageSize($dir."/".GETPOST("file", 'alpha'));
|
||||
$height = $infoarray['height'];
|
||||
|
||||
@ -26,11 +26,13 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
|
||||
if (is_numeric($crit)) {
|
||||
$sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'";
|
||||
} elseif (is_array($crit)) {
|
||||
$sql .= ' AND (' . $extrafieldsobjectprefix.$tmpkey
|
||||
.' BETWEEN "'
|
||||
. $db->idate($crit['start'])
|
||||
. '" AND "'
|
||||
. $db->idate($crit['end']) . '")';
|
||||
if ($crit['start'] !== '' && $crit['end'] !== '') {
|
||||
$sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey." BETWEEN '". $db->idate($crit['start']). "' AND '".$db->idate($crit['end']) . "')";
|
||||
} elseif ($crit['start'] !== '') {
|
||||
$sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey." >= '". $db->idate($crit['start'])."')";
|
||||
} elseif ($crit['end'] !== '') {
|
||||
$sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey." <= '". $db->idate($crit['end'])."')";
|
||||
}
|
||||
}
|
||||
} elseif (in_array($typ, array('boolean')))
|
||||
{
|
||||
@ -44,6 +46,7 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
|
||||
$mode_search = 0;
|
||||
if (in_array($typ, array('int', 'double', 'real', 'price'))) $mode_search = 1; // Search on a numeric
|
||||
if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') $mode_search = 2; // Search on a foreign key int
|
||||
if (in_array($typ, array('sellist')) && !is_numeric($crit)) $mode_search = 0;// Search on a foreign key string
|
||||
if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search = 4; // Search on a multiselect field with sql type = text
|
||||
if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string
|
||||
elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) {
|
||||
|
||||
@ -320,9 +320,12 @@ if ($nolinesbefore) {
|
||||
echo '</div>';
|
||||
}
|
||||
if (is_object($objectline)) {
|
||||
print '<div style="padding-top: 10px" id="extrafield_lines_area_create" name="extrafield_lines_area_create">';
|
||||
print $objectline->showOptionals($extrafields, 'edit', array(), '', '', 1, 'line');
|
||||
print '</div>';
|
||||
$temps = $objectline->showOptionals($extrafields, 'create', array(), '', '', 1, 'line');;
|
||||
if (!empty($temps)) {
|
||||
print '<div style="padding-top: 10px" id="extrafield_lines_area_create" name="extrafield_lines_area_create">';
|
||||
print $temps;
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
echo '</td>';
|
||||
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
|
||||
|
||||
@ -128,9 +128,12 @@ $coldisplay++;
|
||||
//Line extrafield
|
||||
if (!empty($extrafields))
|
||||
{
|
||||
print '<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
|
||||
print $line->showOptionals($extrafields, 'edit', array('class'=>'tredited'), '', '', 1, 'line');
|
||||
print '</div>';
|
||||
$temps = $line->showOptionals($extrafields, 'edit', array('class'=>'tredited'), '', '', 1, 'line');
|
||||
if (!empty($temps)) {
|
||||
print '<div style="padding-top: 10px" id="extrafield_lines_area_edit" name="extrafield_lines_area_edit">';
|
||||
print $temps;
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
// Show autofill date for recuring invoices
|
||||
|
||||
@ -160,9 +160,12 @@ if (($line->info_bits & 2) == 2) {
|
||||
//Line extrafield
|
||||
if (!empty($extrafields))
|
||||
{
|
||||
print '<div style="padding-top: 10px" id="extrafield_lines_area_'.$line->id.'" name="extrafield_lines_area_'.$line->id.'">';
|
||||
print $line->showOptionals($extrafields, 'view', array(), '', '', 1, 'line');
|
||||
print '</div>';
|
||||
$temps = $line->showOptionals($extrafields, 'view', array(), '', '', 1, 'line');
|
||||
if (!empty($temps)) {
|
||||
print '<div style="padding-top: 10px" id="extrafield_lines_area_'.$line->id.'" name="extrafield_lines_area_'.$line->id.'">';
|
||||
print $temps;
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -891,11 +891,17 @@ class CommandeFournisseur extends CommonOrder
|
||||
* Class invoiced the supplier order
|
||||
*
|
||||
* @param User $user Object user making the change
|
||||
* @return int <0 if KO, >0 if KO
|
||||
* @return int <0 if KO, 0 if already billed, >0 if OK
|
||||
*/
|
||||
public function classifyBilled(User $user)
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
if ($this->billed)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur SET billed = 1';
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -280,13 +280,10 @@ class ProductFournisseur extends Product
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
$multicurrency_buyprice = null;
|
||||
$multicurrency_unitBuyPrice = null;
|
||||
$fk_multicurrency = null;
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
if (empty($multicurrency_tx)) $multicurrency_tx = 1;
|
||||
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
|
||||
|
||||
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
|
||||
if ($multicurrency_price_base_type == 'TTC')
|
||||
{
|
||||
@ -1071,15 +1068,89 @@ class ProductFournisseur extends Product
|
||||
{
|
||||
global $db, $conf, $langs;
|
||||
|
||||
if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
|
||||
if (!empty($conf->dol_no_mouse_hover)) {
|
||||
$notooltip = 1; // Force disable tooltips
|
||||
}
|
||||
|
||||
$result = '';
|
||||
$label = '';
|
||||
|
||||
$label = '<u>'.$langs->trans("SupplierRef").'</u>';
|
||||
$label .= '<br>';
|
||||
$label .= '<b>'.$langs->trans('Product').':</b> '.$this->product_ref;
|
||||
if (!empty($this->entity)) {
|
||||
$tmpphoto = $this->show_photos('product', $conf->product->multidir_output[$this->entity], 1, 1, 0, 0, 0, 80);
|
||||
if ($this->nbphoto > 0) {
|
||||
$label .= '<div class="photointooltip">';
|
||||
$label .= $tmpphoto;
|
||||
$label .= '</div><div style="clear: both;"></div>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->type == Product::TYPE_PRODUCT) {
|
||||
$label .= img_picto('', 'product').' <u class="paddingrightonly">'.$langs->trans("Product").'</u>';
|
||||
} elseif ($this->type == Product::TYPE_SERVICE) {
|
||||
$label .= img_picto('', 'service').' <u class="paddingrightonly">'.$langs->trans("Service").'</u>';
|
||||
}
|
||||
if (isset($this->status) && isset($this->status_buy)) {
|
||||
$label .= ' '.$this->getLibStatut(5, 0);
|
||||
$label .= ' '.$this->getLibStatut(5, 1);
|
||||
}
|
||||
|
||||
if (!empty($this->ref)) {
|
||||
$label .= '<br><b>'.$langs->trans('ProductRef').':</b> '.($this->ref ? $this->ref : $this->product_ref);
|
||||
}
|
||||
if (!empty($this->label)) {
|
||||
$label .= '<br><b>'.$langs->trans('ProductLabel').':</b> '.$this->label;
|
||||
}
|
||||
$label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.$this->ref_supplier;
|
||||
|
||||
if ($this->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||
if (!empty($conf->productbatch->enabled)) {
|
||||
$langs->load("productbatch");
|
||||
$label .= "<br><b>".$langs->trans("ManageLotSerial").'</b>: '.$this->getLibStatut(0, 2);
|
||||
}
|
||||
}
|
||||
if (!empty($conf->barcode->enabled)) {
|
||||
$label .= '<br><b>'.$langs->trans('BarCode').':</b> '.$this->barcode;
|
||||
}
|
||||
|
||||
if ($this->type == Product::TYPE_PRODUCT) {
|
||||
if ($this->weight) {
|
||||
$label .= "<br><b>".$langs->trans("Weight").'</b>: '.$this->weight.' '.measuringUnitString(0, "weight", $this->weight_units);
|
||||
}
|
||||
$labelsize = "";
|
||||
if ($this->length) {
|
||||
$labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Length").'</b>: '.$this->length.' '.measuringUnitString(0, 'size', $this->length_units);
|
||||
}
|
||||
if ($this->width) {
|
||||
$labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Width").'</b>: '.$this->width.' '.measuringUnitString(0, 'size', $this->width_units);
|
||||
}
|
||||
if ($this->height) {
|
||||
$labelsize .= ($labelsize ? " - " : "")."<b>".$langs->trans("Height").'</b>: '.$this->height.' '.measuringUnitString(0, 'size', $this->height_units);
|
||||
}
|
||||
if ($labelsize) $label .= "<br>".$labelsize;
|
||||
|
||||
$labelsurfacevolume = "";
|
||||
if ($this->surface) {
|
||||
$labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Surface").'</b>: '.$this->surface.' '.measuringUnitString(0, 'surface', $this->surface_units);
|
||||
}
|
||||
if ($this->volume) {
|
||||
$labelsurfacevolume .= ($labelsurfacevolume ? " - " : "")."<b>".$langs->trans("Volume").'</b>: '.$this->volume.' '.measuringUnitString(0, 'volume', $this->volume_units);
|
||||
}
|
||||
if ($labelsurfacevolume) $label .= "<br>".$labelsurfacevolume;
|
||||
}
|
||||
|
||||
if (!empty($conf->accounting->enabled) && $this->status) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
$label .= '<br><b>'.$langs->trans('ProductAccountancySellCode').':</b> '.length_accountg($this->accountancy_code_sell);
|
||||
$label .= '<br><b>'.$langs->trans('ProductAccountancySellIntraCode').':</b> '.length_accountg($this->accountancy_code_sell_intra);
|
||||
$label .= '<br><b>'.$langs->trans('ProductAccountancySellExportCode').':</b> '.length_accountg($this->accountancy_code_sell_export);
|
||||
}
|
||||
if (!empty($conf->accounting->enabled) && $this->status_buy) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
$label .= '<br><b>'.$langs->trans('ProductAccountancyBuyCode').':</b> '.length_accountg($this->accountancy_code_buy);
|
||||
$label .= '<br><b>'.$langs->trans('ProductAccountancyBuyIntraCode').':</b> '.length_accountg($this->accountancy_code_buy_intra);
|
||||
$label .= '<br><b>'.$langs->trans('ProductAccountancyBuyExportCode').':</b> '.length_accountg($this->accountancy_code_buy_export);
|
||||
}
|
||||
|
||||
$logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id, 'pfpl.datec', 'DESC'); // set sort order here
|
||||
if (is_array($logPrices) && count($logPrices) > 0) {
|
||||
$label .= '<br><br>';
|
||||
@ -1089,33 +1160,40 @@ class ProductFournisseur extends Product
|
||||
|
||||
$url = dol_buildpath('/product/fournisseurs.php', 1).'?id='.$this->id.'&action=add_price&socid='.$this->fourn_id.'&rowid='.$this->product_fourn_price_id;
|
||||
|
||||
if ($option != 'nolink')
|
||||
{
|
||||
if ($option != 'nolink') {
|
||||
// Add param to save lastsearch_values or not
|
||||
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
|
||||
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1;
|
||||
if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1';
|
||||
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) {
|
||||
$add_save_lastsearch_values = 1;
|
||||
}
|
||||
if ($add_save_lastsearch_values) {
|
||||
$url .= '&save_lastsearch_values=1';
|
||||
}
|
||||
}
|
||||
|
||||
$linkclose = '';
|
||||
if (empty($notooltip))
|
||||
{
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||
{
|
||||
if (empty($notooltip)) {
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$label = $langs->trans("SupplierRef");
|
||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
}
|
||||
$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
|
||||
$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
|
||||
} else $linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
|
||||
} else {
|
||||
$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
|
||||
}
|
||||
|
||||
$linkstart = '<a href="'.$url.'"';
|
||||
$linkstart .= $linkclose.'>';
|
||||
$linkend = '</a>';
|
||||
|
||||
$result .= $linkstart;
|
||||
if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||
if ($withpicto != 2) $result .= $this->ref.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : '');
|
||||
if ($withpicto) {
|
||||
$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
|
||||
}
|
||||
if ($withpicto != 2) {
|
||||
$result .= $this->ref.($this->ref_supplier ? ' ('.$this->ref_supplier.')' : '');
|
||||
}
|
||||
$result .= $linkend;
|
||||
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
|
||||
|
||||
|
||||
@ -1610,7 +1610,7 @@ if ($action == 'create')
|
||||
print $societe->getNomUrl(1);
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
} else {
|
||||
print $form->select_company((empty($socid) ? '' : $socid), 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||
print img_picto('', 'company').$form->select_company((empty($socid) ? '' : $socid), 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||
// reload page to retrieve customer informations
|
||||
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE))
|
||||
{
|
||||
@ -1672,6 +1672,7 @@ if ($action == 'create')
|
||||
{
|
||||
$langs->load("bank");
|
||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td>';
|
||||
print img_picto('', 'bank_account', 'class="paddingrightonly"');
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1683,7 +1684,7 @@ if ($action == 'create')
|
||||
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td>';
|
||||
$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print img_picto('', 'project').$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$societe->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ if (empty($reshook))
|
||||
$uploaddir = $conf->fournisseur->commande->dir_output;
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
// TODO Move this into mass action include
|
||||
// Mass action to generate vendor bills
|
||||
if ($massaction == 'confirm_createsupplierbills')
|
||||
{
|
||||
$orders = GETPOST('toselect', 'array');
|
||||
@ -255,6 +255,8 @@ if (empty($reshook))
|
||||
$TFactThird = array();
|
||||
|
||||
$nb_bills_created = 0;
|
||||
$lastid = 0;
|
||||
$lastref = '';
|
||||
|
||||
$db->begin();
|
||||
|
||||
@ -263,8 +265,9 @@ if (empty($reshook))
|
||||
if ($cmd->fetch($id_order) <= 0) continue;
|
||||
|
||||
$objecttmp = new FactureFournisseur($db);
|
||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order.
|
||||
else {
|
||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) {
|
||||
$objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order.
|
||||
} else {
|
||||
$objecttmp->socid = $cmd->socid;
|
||||
$objecttmp->type = $objecttmp::TYPE_STANDARD;
|
||||
$objecttmp->cond_reglement_id = $cmd->cond_reglement_id;
|
||||
@ -285,7 +288,11 @@ if (empty($reshook))
|
||||
|
||||
$res = $objecttmp->create($user);
|
||||
|
||||
if ($res > 0) $nb_bills_created++;
|
||||
if ($res > 0) {
|
||||
$nb_bills_created++;
|
||||
$lastref = $objecttmp->ref;
|
||||
$lastid = $objecttmp->id;
|
||||
}
|
||||
}
|
||||
|
||||
if ($objecttmp->id > 0)
|
||||
@ -442,7 +449,14 @@ if (empty($reshook))
|
||||
if (!$error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs');
|
||||
|
||||
if ($nb_bills_created == 1) {
|
||||
$texttoshow = $langs->trans('BillXCreated', '{s1}');
|
||||
$texttoshow = str_replace('{s1}', '<a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?id='.urlencode($lastid).'">'.$lastref.'</a>', $texttoshow);
|
||||
setEventMessages($texttoshow, null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs');
|
||||
}
|
||||
|
||||
// Make a redirect to avoid to bill twice if we make a refresh or back
|
||||
$param = '';
|
||||
@ -459,7 +473,7 @@ if (empty($reshook))
|
||||
if ($search_deliveryyear) $param .= '&search_deliveryyear='.urlencode($search_deliveryyear);
|
||||
if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
|
||||
if ($search_company) $param .= '&search_company='.urlencode($search_company);
|
||||
if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer);
|
||||
//if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer);
|
||||
if ($search_user > 0) $param .= '&search_user='.urlencode($search_user);
|
||||
if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale);
|
||||
if ($search_total_ht != '') $param .= '&search_total_ht='.urlencode($search_total_ht);
|
||||
|
||||
@ -656,10 +656,10 @@ if (empty($reshook))
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
$dateinvoice = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||
$datedue = dol_mktime(12, 0, 0, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']);
|
||||
$datedue = dol_mktime(12, 0, 0, GETPOST('echmonth', 'int'), GETPOST('echday', 'int'), GETPOST('echyear', 'int'));
|
||||
|
||||
// Replacement invoice
|
||||
if ($_POST['type'] == FactureFournisseur::TYPE_REPLACEMENT)
|
||||
if (GETPOST('type') == FactureFournisseur::TYPE_REPLACEMENT)
|
||||
{
|
||||
if (empty($dateinvoice)) {
|
||||
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('DateInvoice')), null, 'errors');
|
||||
@ -713,7 +713,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Credit note invoice
|
||||
if ($_POST['type'] == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
if (GETPOST('type') == FactureFournisseur::TYPE_CREDIT_NOTE)
|
||||
{
|
||||
$sourceinvoice = GETPOST('fac_avoir', 'int');
|
||||
if (!($sourceinvoice > 0) && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE))
|
||||
@ -837,7 +837,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Standard or deposit
|
||||
if ($_POST['type'] == FactureFournisseur::TYPE_STANDARD || $_POST['type'] == FactureFournisseur::TYPE_DEPOSIT)
|
||||
if (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT)
|
||||
{
|
||||
if (GETPOST('socid', 'int') < 1)
|
||||
{
|
||||
@ -869,11 +869,12 @@ if (empty($reshook))
|
||||
{
|
||||
$tmpproject = GETPOST('projectid', 'int');
|
||||
|
||||
// Creation facture
|
||||
$object->ref = $_POST['ref'];
|
||||
$object->ref_supplier = $_POST['ref_supplier'];
|
||||
$object->socid = $_POST['socid'];
|
||||
$object->libelle = $_POST['label'];
|
||||
// Creation invoice
|
||||
$object->ref = GETPOST('ref', 'nohtml');
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'nohtml');
|
||||
$object->socid = GETPOST('socid', 'int');
|
||||
$object->libelle = GETPOST('label', 'nohtml'); // deprecated
|
||||
$object->label = GETPOST('label', 'nohtml');
|
||||
$object->date = $dateinvoice;
|
||||
$object->date_echeance = $datedue;
|
||||
$object->note_public = GETPOST('note_public', 'restricthtml');
|
||||
@ -894,7 +895,7 @@ if (empty($reshook))
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
// If creation from another object of another module
|
||||
if (!$error && $_POST['origin'] && $_POST['originid'])
|
||||
if (!$error && GETPOST('origin', 'alpha') && GETPOST('originid'))
|
||||
{
|
||||
// Parse element/subelement (ex: project_task)
|
||||
$element = $subelement = GETPOST('origin', 'alpha');
|
||||
@ -1385,7 +1386,9 @@ if (empty($reshook))
|
||||
|
||||
$fk_unit = GETPOST('units', 'alpha');
|
||||
|
||||
$tva_tx = price2num($tva_tx); // When vat is text input field
|
||||
if (!preg_match('/\((.*)\)/', $tva_tx)) {
|
||||
$tva_tx = price2num($tva_tx); // $txtva can have format '5,1' or '5.1' or '5.1(XXX)', we must clean only if '5,1'
|
||||
}
|
||||
|
||||
// Local Taxes
|
||||
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty);
|
||||
@ -1805,7 +1808,7 @@ if ($action == 'create')
|
||||
print $societe->getNomUrl(1);
|
||||
print '<input type="hidden" name="socid" value="'.$societe->id.'">';
|
||||
} else {
|
||||
print $form->select_company($societe->id, 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||
print img_picto('', 'company').$form->select_company($societe->id, 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||
// reload page to retrieve supplier informations
|
||||
if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE))
|
||||
{
|
||||
@ -2020,7 +2023,7 @@ if ($action == 'create')
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> ';
|
||||
$text = $tmp.$langs->trans("InvoiceAvoir").' ';
|
||||
$text .= '('.$langs->trans("YouMustCreateInvoiceFromSupplierThird").') ';
|
||||
$text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromSupplierThird").')</span> ';
|
||||
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
|
||||
print $desc;
|
||||
print '</div></div>'."\n";
|
||||
@ -2071,17 +2074,7 @@ if ($action == 'create')
|
||||
if (!empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('BankAccount').'</td><td>';
|
||||
$form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ?GETPOST('multicurrency_code', 'alpha') : $currency_code), 'multicurrency_code');
|
||||
print img_picto('', 'bank_account').$form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1, '', 0, '', 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -2092,7 +2085,7 @@ if ($action == 'create')
|
||||
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td>';
|
||||
$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
|
||||
print img_picto('', 'project').$formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -2106,6 +2099,16 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Multicurrency
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
print $form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ?GETPOST('multicurrency_code', 'alpha') : $currency_code), 'multicurrency_code');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Intracomm report
|
||||
if (!empty($conf->intracommreport->enabled))
|
||||
{
|
||||
@ -2227,11 +2230,9 @@ if ($action == 'create')
|
||||
}
|
||||
} else {
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
/* *************************************************************************** */
|
||||
/* */
|
||||
/* Fiche en mode visu ou edition */
|
||||
/* */
|
||||
/* *************************************************************************** */
|
||||
//
|
||||
// View or edit mode
|
||||
//
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
@ -3101,8 +3102,9 @@ if ($action == 'create')
|
||||
if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) $senderissupplier = 1;
|
||||
|
||||
// Show object lines
|
||||
if (!empty($object->lines))
|
||||
if (!empty($object->lines)) {
|
||||
$ret = $object->printObjectLines($action, $societe, $mysoc, $lineid, 1);
|
||||
}
|
||||
|
||||
$num = count($object->lines);
|
||||
|
||||
|
||||
259
htdocs/index.php
259
htdocs/index.php
@ -112,219 +112,6 @@ $boxstatFromHook = '';
|
||||
// Load translation files required by page
|
||||
$langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts'));
|
||||
|
||||
// Load global statistics of objects
|
||||
if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
||||
{
|
||||
$object = new stdClass();
|
||||
$parameters = array();
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
$boxstatFromHook = $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cle array returned by the method load_state_board for each line
|
||||
$keys = array(
|
||||
'users',
|
||||
'members',
|
||||
'expensereports',
|
||||
'holidays',
|
||||
'customers',
|
||||
'prospects',
|
||||
'suppliers',
|
||||
'contacts',
|
||||
'products',
|
||||
'services',
|
||||
'projects',
|
||||
'proposals',
|
||||
'orders',
|
||||
'invoices',
|
||||
'donations',
|
||||
'supplier_proposals',
|
||||
'supplier_orders',
|
||||
'supplier_invoices',
|
||||
'contracts',
|
||||
'interventions',
|
||||
'ticket'
|
||||
);
|
||||
|
||||
// Condition to be checked for each display line dashboard
|
||||
$conditions = array(
|
||||
'users' => $user->rights->user->user->lire,
|
||||
'members' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire,
|
||||
'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
|
||||
'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
|
||||
'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
|
||||
'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire,
|
||||
'products' => !empty($conf->product->enabled) && $user->rights->produit->lire,
|
||||
'services' => !empty($conf->service->enabled) && $user->rights->service->lire,
|
||||
'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire,
|
||||
'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire,
|
||||
'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire,
|
||||
'donations' => !empty($conf->don->enabled) && $user->rights->don->lire,
|
||||
'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire,
|
||||
'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire,
|
||||
'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS),
|
||||
'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS),
|
||||
'supplier_proposals' => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS),
|
||||
'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire,
|
||||
'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire,
|
||||
'holidays' => !empty($conf->holiday->enabled) && $user->rights->holiday->read,
|
||||
'ticket' => !empty($conf->ticket->enabled) && $user->rights->ticket->read
|
||||
);
|
||||
// Class file containing the method load_state_board for each line
|
||||
$includes = array(
|
||||
'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php",
|
||||
'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php",
|
||||
'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
||||
'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
||||
'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php",
|
||||
'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php",
|
||||
'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php",
|
||||
'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php",
|
||||
'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php",
|
||||
'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php",
|
||||
'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
|
||||
'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php",
|
||||
'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php",
|
||||
'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php",
|
||||
'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php",
|
||||
'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php",
|
||||
'supplier_proposals' => DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php",
|
||||
'projects' => DOL_DOCUMENT_ROOT."/projet/class/project.class.php",
|
||||
'expensereports' => DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php",
|
||||
'holidays' => DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php",
|
||||
'ticket' => DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"
|
||||
);
|
||||
// Name class containing the method load_state_board for each line
|
||||
$classes = array(
|
||||
'users' => 'User',
|
||||
'members' => 'Adherent',
|
||||
'customers' => 'Client',
|
||||
'prospects' => 'Client',
|
||||
'suppliers' => 'Fournisseur',
|
||||
'contacts' => 'Contact',
|
||||
'products' => 'Product',
|
||||
'services' => 'ProductService',
|
||||
'proposals' => 'Propal',
|
||||
'orders' => 'Commande',
|
||||
'invoices' => 'Facture',
|
||||
'donations' => 'Don',
|
||||
'contracts' => 'Contrat',
|
||||
'interventions' => 'Fichinter',
|
||||
'supplier_orders' => 'CommandeFournisseur',
|
||||
'supplier_invoices' => 'FactureFournisseur',
|
||||
'supplier_proposals' => 'SupplierProposal',
|
||||
'projects' => 'Project',
|
||||
'expensereports' => 'ExpenseReport',
|
||||
'holidays' => 'Holiday',
|
||||
'ticket' => 'Ticket',
|
||||
);
|
||||
// Translation keyword
|
||||
$titres = array(
|
||||
'users' => "Users",
|
||||
'members' => "Members",
|
||||
'customers' => "ThirdPartyCustomersStats",
|
||||
'prospects' => "ThirdPartyProspectsStats",
|
||||
'suppliers' => "Suppliers",
|
||||
'contacts' => "Contacts",
|
||||
'products' => "Products",
|
||||
'services' => "Services",
|
||||
'proposals' => "CommercialProposalsShort",
|
||||
'orders' => "CustomersOrders",
|
||||
'invoices' => "BillsCustomers",
|
||||
'donations' => "Donations",
|
||||
'contracts' => "Contracts",
|
||||
'interventions' => "Interventions",
|
||||
'supplier_orders' => "SuppliersOrders",
|
||||
'supplier_invoices' => "SuppliersInvoices",
|
||||
'supplier_proposals' => "SupplierProposalShort",
|
||||
'projects' => "Projects",
|
||||
'expensereports' => "ExpenseReports",
|
||||
'holidays' => "Holidays",
|
||||
'ticket' => "Ticket",
|
||||
);
|
||||
// Dashboard Link lines
|
||||
$links = array(
|
||||
'users' => DOL_URL_ROOT.'/user/list.php',
|
||||
'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
|
||||
'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
|
||||
'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
|
||||
'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
|
||||
'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
|
||||
'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
|
||||
'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
|
||||
'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
|
||||
'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
|
||||
'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
|
||||
'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations',
|
||||
'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
|
||||
'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
|
||||
'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
|
||||
'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
|
||||
'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
|
||||
'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
|
||||
'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
|
||||
'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
|
||||
'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket'
|
||||
);
|
||||
// Translation lang files
|
||||
$langfile = array(
|
||||
'customers' => "companies",
|
||||
'contacts' => "companies",
|
||||
'services' => "products",
|
||||
'proposals' => "propal",
|
||||
'invoices' => "bills",
|
||||
'supplier_orders' => "orders",
|
||||
'supplier_invoices' => "bills",
|
||||
'supplier_proposals' => 'supplier_proposal',
|
||||
'expensereports' => "trips",
|
||||
'holidays' => "holiday",
|
||||
);
|
||||
|
||||
|
||||
// Loop and displays each line of table
|
||||
$boardloaded = array();
|
||||
foreach ($keys as $val)
|
||||
{
|
||||
if ($conditions[$val])
|
||||
{
|
||||
$boxstatItem = '';
|
||||
$class = $classes[$val];
|
||||
// Search in cache if load_state_board is already realized
|
||||
$classkeyforcache = $class;
|
||||
if ($classkeyforcache == 'ProductService') $classkeyforcache = 'Product'; // ProductService use same load_state_board than Product
|
||||
|
||||
if (!isset($boardloaded[$classkeyforcache]) || !is_object($boardloaded[$classkeyforcache]))
|
||||
{
|
||||
include_once $includes[$val]; // Loading a class cost around 1Mb
|
||||
|
||||
$board = new $class($db);
|
||||
$board->load_state_board();
|
||||
$boardloaded[$class] = $board;
|
||||
} else {
|
||||
$board = $boardloaded[$classkeyforcache];
|
||||
}
|
||||
|
||||
$langs->load(empty($langfile[$val]) ? $val : $langfile[$val]);
|
||||
|
||||
$text = $langs->trans($titres[$val]);
|
||||
$boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
||||
$boxstatItem .= '<div class="boxstats">';
|
||||
$boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
|
||||
$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.(!empty($board->nb[$val]) ? $board->nb[$val] : 0).'</span>';
|
||||
$boxstatItem .= '</div>';
|
||||
$boxstatItem .= '</a>';
|
||||
|
||||
$boxstatItems[$val] = $boxstatItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Dolibarr Working Board with weather
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
|
||||
@ -901,54 +688,8 @@ $boxlist .= $resultboxes['boxlista'];
|
||||
|
||||
$boxlist .= '</div>';
|
||||
|
||||
|
||||
if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
||||
{
|
||||
// Remove allready present info in new dash board
|
||||
if (!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0) {
|
||||
foreach ($boxstatItems as $boxstatItemKey => $boxstatItemHtml) {
|
||||
if (in_array($boxstatItemKey, $globalStatInTopOpenedDashBoard)) {
|
||||
unset($boxstatItems[$boxstatItemKey]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($boxstatFromHook) || !empty($boxstatItems)) {
|
||||
$boxstat = '<!-- Database statistics -->'."\n";
|
||||
$boxstat .= '<div class="box">';
|
||||
$boxstat .= '<table summary="'.dol_escape_htmltag($langs->trans("DolibarrStateBoard")).'" class="noborder boxtable boxtablenobottom nohover widgetstats" width="100%">';
|
||||
$boxstat .= '<tr class="liste_titre box_titre">';
|
||||
$boxstat .= '<td>';
|
||||
$boxstat .= '<div class="inline-block valignmiddle">'.$langs->trans("DolibarrStateBoard").'</div>';
|
||||
$boxstat .= '</td>';
|
||||
$boxstat .= '</tr>';
|
||||
$boxstat .= '<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer">';
|
||||
|
||||
$boxstat .= $boxstatFromHook;
|
||||
|
||||
if (is_array($boxstatItems) && count($boxstatItems) > 0)
|
||||
{
|
||||
$boxstat .= implode('', $boxstatItems);
|
||||
}
|
||||
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
|
||||
|
||||
$boxstat .= '</td></tr>';
|
||||
$boxstat .= '</table>';
|
||||
$boxstat .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$boxlist .= '<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
|
||||
|
||||
$boxlist .= $boxstat;
|
||||
$boxlist .= $resultboxes['boxlistb'];
|
||||
|
||||
$boxlist .= '</div>';
|
||||
|
||||
@ -122,7 +122,7 @@ if (!function_exists("imagecreate"))
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportGD")."<br>\n";
|
||||
// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
|
||||
} else {
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportGD")."<br>\n";
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "GD")."<br>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@ if (!function_exists("curl_init"))
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCurl")."<br>\n";
|
||||
// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
|
||||
} else {
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportCurl")."<br>\n";
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "Curl")."<br>\n";
|
||||
}
|
||||
|
||||
// Check if PHP calendar extension is available
|
||||
@ -141,7 +141,7 @@ if (!function_exists("easter_date"))
|
||||
{
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportCalendar")."<br>\n";
|
||||
} else {
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportCalendar")."<br>\n";
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "Calendar")."<br>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -152,7 +152,7 @@ if (!function_exists("utf8_encode"))
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."<br>\n";
|
||||
// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
|
||||
} else {
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportUTF8")."<br>\n";
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "UTF8")."<br>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
|
||||
print '<img src="../theme/eldy/img/warning.png" alt="Error"> '.$langs->trans("ErrorPHPDoesNotSupportIntl")."<br>\n";
|
||||
// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
|
||||
} else {
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupportIntl")."<br>\n";
|
||||
print '<img src="../theme/eldy/img/tick.png" alt="Ok"> '.$langs->trans("PHPSupport", "Intl")."<br>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -173,3 +173,8 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
|
||||
-- Description of chart of account TG SYSCOHADA
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA-TG', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- Description of chart of account USA US-BASE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 11, 'US-BASE', 'USA basic chart of accounts', 1);
|
||||
|
||||
-- Description of chart of account Canada CA-ENG-BASE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 14, 'CA-ENG-BASE', 'Canadian basic chart of accounts - English', 1);
|
||||
|
||||
@ -33,141 +33,141 @@
|
||||
-- ID 1000 - 9999
|
||||
-- ADD 1100000 to rowid # Do no remove this comment --
|
||||
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1000,'US-BASE','ASSETS', 'XXXXXX', '1', '0', 'Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 2000,'US-BASE','LIABILITIES', 'XXXXXX', '2', '0', 'Liabilities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 3000,'US-BASE','EQUITY', 'XXXXXX', '3', '0', 'Equity', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 4000,'US-BASE','INCOME', 'XXXXXX', '4', '0', 'Revenue', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 5000,'US-BASE','COGS', 'XXXXXX', '5', '0', 'Cost of Goods Sold', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 6000,'US-BASE','EXPENSE', 'XXXXXX', '6', '0', 'Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 7000,'US-BASE','OTHER_REVENUE', 'XXXXXX', '7', '0', 'Other Revenue', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 8000,'US-BASE','OTHER_EXPENSES', 'XXXXXX', '8', '0', 'Other Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1000, 'US-BASE', 'ASSETS', '1', '0', 'Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 2000, 'US-BASE', 'LIABILITIES', '2', '0', 'Liabilities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 3000, 'US-BASE', 'EQUITY', '3', '0', 'Equity', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 4000, 'US-BASE', 'INCOME', '4', '0', 'Revenue', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5000, 'US-BASE', 'COGS', '5', '0', 'Cost of Goods Sold', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 6000, 'US-BASE', 'EXPENSE', '6', '0', 'Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 7000, 'US-BASE', 'OTHER_REVENUE', '7', '0', 'Other Revenue', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 8000, 'US-BASE', 'OTHER_EXPENSES', '8', '0', 'Other Expenses', 1);
|
||||
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1010, 'US-BASE', 'ASSETS', 'CASH', '1010', '1000', 'Cash on Hand', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1011, 'US-BASE', 'ASSETS', 'CASH', '1020', '1000', 'Checking Account', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1012, 'US-BASE', 'ASSETS', 'CASH', '1030', '1000', 'Savings Account', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1013, 'US-BASE', 'ASSETS', 'XXXXXX', '1040', '1000', 'Investments and Securities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1014, 'US-BASE', 'ASSETS', 'XXXXXX', '1100', '1000', 'Accounts Receivable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1015, 'US-BASE', 'ASSETS', 'XXXXXX', '1140', '1000', 'Other Receivables', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1016, 'US-BASE', 'ASSETS', 'XXXXXX', '1150', '1000', 'Allowance for Doubtful Accounts', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1017, 'US-BASE', 'ASSETS', 'XXXXXX', '1200', '1000', 'Raw Materials Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1018, 'US-BASE', 'ASSETS', 'XXXXXX', '1205', '1000', 'Supplies Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1019, 'US-BASE', 'ASSETS', 'XXXXXX', '1210', '1000', 'Work in Progress Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1020, 'US-BASE', 'ASSETS', 'XXXXXX', '1215', '1000', 'Finished Goods Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1021, 'US-BASE', 'ASSETS', 'XXXXXX', '1400', '1000', 'Prepaid Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1022, 'US-BASE', 'ASSETS', 'XXXXXX', '1410', '1000', 'Employee Advances', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1023, 'US-BASE', 'ASSETS', 'XXXXXX', '1420', '1000', 'Notes Receivable - Current', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1024, 'US-BASE', 'ASSETS', 'XXXXXX', '1430', '1000', 'Prepaid Interest', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1025, 'US-BASE', 'ASSETS', 'XXXXXX', '1470', '1000', 'Other Current Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1026, 'US-BASE', 'ASSETS', 'XXXXXX', '1500', '1000', 'Furniture and Fixtures', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1027, 'US-BASE', 'ASSETS', 'XXXXXX', '1510', '1000', 'Equipment', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1028, 'US-BASE', 'ASSETS', 'XXXXXX', '1520', '1000', 'Vehicles', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1029, 'US-BASE', 'ASSETS', 'XXXXXX', '1530', '1000', 'Other Depreciable Property', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1030, 'US-BASE', 'ASSETS', 'XXXXXX', '1550', '1000', 'Buildings', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1031, 'US-BASE', 'ASSETS', 'XXXXXX', '1560', '1000', 'Building Improvements', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1032, 'US-BASE', 'ASSETS', 'XXXXXX', '1690', '1000', 'Land', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1033, 'US-BASE', 'ASSETS', 'XXXXXX', '1700', '1000', 'Accumulated Depreciation, Furniture and Fixtures', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1034, 'US-BASE', 'ASSETS', 'XXXXXX', '1710', '1000', 'Accumulated Depreciation, Equipment', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1035, 'US-BASE', 'ASSETS', 'XXXXXX', '1720', '1000', 'Accumulated Depreciation, Vehicles', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1036, 'US-BASE', 'ASSETS', 'XXXXXX', '1730', '1000', 'Accumulated Depreciation, Buildings', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1037, 'US-BASE', 'ASSETS', 'XXXXXX', '1740', '1000', 'Accumulated Depreciation, Building Improvements', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1038, 'US-BASE', 'ASSETS', 'XXXXXX', '1750', '1000', 'Accumulated Depreciation, Other', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1039, 'US-BASE', 'ASSETS', 'XXXXXX', '1900', '1000', 'Deposits', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1040, 'US-BASE', 'ASSETS', 'XXXXXX', '1910', '1000', 'Accumulated Amortization', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1041, 'US-BASE', 'ASSETS', 'XXXXXX', '1920', '1000', 'Notes Receivable - Non-current', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1042, 'US-BASE', 'ASSETS', 'XXXXXX', '1990', '1000', 'Other Non-current Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1043, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2100', '2000', 'Accounts Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1044, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2300', '2000', 'Accrued Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1045, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2310', '2000', 'Sales Tax Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1046, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2320', '2000', 'Wages Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1047, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2330', '2000', '401-K Deductions Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1048, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2335', '2000', 'Health Insurance Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1049, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2340', '2000', 'Federal Payroll Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1050, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2350', '2000', 'Federal Unemployment Tax Act - Tax Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1051, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2360', '2000', 'State Payroll Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1052, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2370', '2000', 'State Unemployment Tax Act - Tax Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1053, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2380', '2000', 'Local Payroll Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1054, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2390', '2000', 'Income Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1055, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2400', '2000', 'Other Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1056, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2410', '2000', 'Employee Benefits Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1057, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2420', '2000', 'Current Portion of Long-term Debt', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1058, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2440', '2000', 'Deposits from Customers', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1059, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2480', '2000', 'Other Current Liabilities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1060, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2700', '2000', 'Notes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1061, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2702', '2000', 'Land Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1062, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2704', '2000', 'Equipment Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1063, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2706', '2000', 'Vehicles Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1064, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2708', '2000', 'Bank Loans Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1065, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2710', '2000', 'Deferred Revenue', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1066, 'US-BASE', 'LIABILITIES', 'XXXXXX', '2740', '2000', 'Other Long-term Liabilities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1067, 'US-BASE', 'CAPITAL', 'XXXXXX', '3010', '3000', 'Stated Capital', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1068, 'US-BASE', 'CAPITAL', 'XXXXXX', '3020', '3000', 'Capital Surplus', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1069, 'US-BASE', 'CAPITAL', 'XXXXXX', '3030', '3000', 'Retained Earnings', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1070, 'US-BASE', 'INCOME', 'XXXXXX', '4010', '4000', 'Product Sales', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1071, 'US-BASE', 'INCOME', 'XXXXXX', '4060', '4000', 'Reimbursible Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1072, 'US-BASE', 'INCOME', 'XXXXXX', '4061', '4000', 'Reimbursible Expenses - Meals and Entertainment ', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1073, 'US-BASE', 'INCOME', 'XXXXXX', '4540', '4000', 'Finance Charge Income', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1074, 'US-BASE', 'INCOME', 'XXXXXX', '4550', '4000', 'Shipping Charges Reimbursed', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1075, 'US-BASE', 'INCOME', 'XXXXXX', '4800', '4000', 'Sales Returns and Allowances', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1076, 'US-BASE', 'INCOME', 'XXXXXX', '4900', '4000', 'Sales Discounts', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1077, 'US-BASE', 'COGS', 'XXXXXX', '5010', '5000', 'Product Cost', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1078, 'US-BASE', 'COGS', 'XXXXXX', '5050', '5000', 'Raw Material Purchases', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1079, 'US-BASE', 'COGS', 'XXXXXX', '5100', '5000', 'Direct Labor Costs', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1080, 'US-BASE', 'COGS', 'XXXXXX', '5150', '5000', 'Indirect Labor Costs', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1081, 'US-BASE', 'COGS', 'XXXXXX', '5200', '5000', 'Heat and Power', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1082, 'US-BASE', 'COGS', 'XXXXXX', '5250', '5000', 'Commissions', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1083, 'US-BASE', 'COGS', 'XXXXXX', '5300', '5000', 'Miscellaneous Factory Costs', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1084, 'US-BASE', 'COGS', 'XXXXXX', '5700', '5000', 'Cost of Goods Sold, Salaries and Wages', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1085, 'US-BASE', 'COGS', 'XXXXXX', '5730', '5000', 'Cost of Goods Sold, Contract Labor', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1086, 'US-BASE', 'COGS', 'XXXXXX', '5750', '5000', 'Cost of Goods Sold, Freight', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1087, 'US-BASE', 'COGS', 'XXXXXX', '5800', '5000', 'Cost of Goods Sold, Other', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1088, 'US-BASE', 'COGS', 'XXXXXX', '5850', '5000', 'Inventory Adjustments', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1089, 'US-BASE', 'COGS', 'XXXXXX', '5900', '5000', 'Purchase Returns and Allowances', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1090, 'US-BASE', 'COGS', 'XXXXXX', '5950', '5000', 'Purchase Discounts', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1091, 'US-BASE', 'EXPENSE', 'XXXXXX', '6010', '6000', 'Default Purchase Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1092, 'US-BASE', 'EXPENSE', 'XXXXXX', '6020', '6000', 'Advertising Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1093, 'US-BASE', 'EXPENSE', 'XXXXXX', '6050', '6000', 'Amortization Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1094, 'US-BASE', 'EXPENSE', 'XXXXXX', '6100', '6000', 'Auto EXPENSE', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1095, 'US-BASE', 'EXPENSE', 'XXXXXX', '6150', '6000', 'Bad Debt Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1096, 'US-BASE', 'EXPENSE', 'XXXXXX', '6200', '6000', 'Bank Fees', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1097, 'US-BASE', 'EXPENSE', 'XXXXXX', '6250', '6000', 'Cash Over and Short', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1098, 'US-BASE', 'EXPENSE', 'XXXXXX', '6300', '6000', 'Charitable Contributions Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1099, 'US-BASE', 'EXPENSE', 'XXXXXX', '6350', '6000', 'Commissions and Fees Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1100, 'US-BASE', 'EXPENSE', 'XXXXXX', '6450', '6000', 'Dues and Subscriptions Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1101, 'US-BASE', 'EXPENSE', 'XXXXXX', '6500', '6000', 'Employee Benefit Expense, Health Insurance', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1102, 'US-BASE', 'EXPENSE', 'XXXXXX', '6510', '6000', 'Employee Benefit Expense, Pension Plans', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1103, 'US-BASE', 'EXPENSE', 'XXXXXX', '6520', '6000', 'Employee Benefit Expense, Profit Sharing Plan', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1104, 'US-BASE', 'EXPENSE', 'XXXXXX', '6530', '6000', 'Employee Benefit Expense, Other', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1105, 'US-BASE', 'EXPENSE', 'XXXXXX', '6550', '6000', 'Freight Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1106, 'US-BASE', 'EXPENSE', 'XXXXXX', '6600', '6000', 'Gifts Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1107, 'US-BASE', 'EXPENSE', 'XXXXXX', '6650', '6000', 'Income Tax Expense, Federal', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1108, 'US-BASE', 'EXPENSE', 'XXXXXX', '6660', '6000', 'Income Tax Expense, State', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1109, 'US-BASE', 'EXPENSE', 'XXXXXX', '6670', '6000', 'Income Tax Expense, Local', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1110, 'US-BASE', 'EXPENSE', 'XXXXXX', '6700', '6000', 'Insurance Expense, Product Liability', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1111, 'US-BASE', 'EXPENSE', 'XXXXXX', '6710', '6000', 'Insurance Expense, Vehicle', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1112, 'US-BASE', 'EXPENSE', 'XXXXXX', '6800', '6000', 'Laundry and Dry Cleaning Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1113, 'US-BASE', 'EXPENSE', 'XXXXXX', '6850', '6000', 'Legal and Professional Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1114, 'US-BASE', 'EXPENSE', 'XXXXXX', '6900', '6000', 'Licenses Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1115, 'US-BASE', 'EXPENSE', 'XXXXXX', '6950', '6000', 'Loss on Non-sufficient Funds Checks', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1116, 'US-BASE', 'OTHER_REVENUE', 'XXXXXX', '7010', '7000', 'Interest Income', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1117, 'US-BASE', 'OTHER_REVENUE', 'XXXXXX', '7030', '7000', 'Other Income', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1118, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8010', '8000', 'Depreciation Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1119, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8020', '8000', 'Interest Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1120, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8030', '8000', 'Maintenance Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1121, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8050', '8000', 'Meals and Entertainment Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1122, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8100', '8000', 'Office Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1123, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8200', '8000', 'Payroll Tax Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1124, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8250', '8000', 'Penalties and Fines Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1125, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8300', '8000', 'Other Taxes', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1126, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8350', '8000', 'Postage Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1127, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8400', '8000', 'Rent or Lease Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1128, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8450', '8000', 'Repair and Maintenance Expense, Office', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1129, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8460', '8000', 'Repair and Maintenance Expense, Vehicle', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1130, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8550', '8000', 'Supplies Expense, Office', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1131, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8600', '8000', 'Telephone Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1132, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8620', '8000', 'Training Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1133, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8650', '8000', 'Travel Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1134, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8700', '8000', 'Salaries Expense, Officers', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1135, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8750', '8000', 'Wages Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1136, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8800', '8000', 'Utilities Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1137, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8900', '8000', 'Gain/Loss on Sale of Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES (__ENTITY__, 1138, 'US-BASE', 'OTHER_EXPENSES', 'XXXXXX', '8950', '8000', 'Other Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1010, 'US-BASE', 'ASSETS', '1010', '1000', 'Cash on Hand', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1011, 'US-BASE', 'ASSETS', '1020', '1000', 'Checking Account', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1012, 'US-BASE', 'ASSETS', '1030', '1000', 'Savings Account', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1013, 'US-BASE', 'ASSETS', '1040', '1000', 'Investments and Securities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1014, 'US-BASE', 'ASSETS', '1100', '1000', 'Accounts Receivable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1015, 'US-BASE', 'ASSETS', '1140', '1000', 'Other Receivables', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1016, 'US-BASE', 'ASSETS', '1150', '1000', 'Allowance for Doubtful Accounts', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1017, 'US-BASE', 'ASSETS', '1200', '1000', 'Raw Materials Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1018, 'US-BASE', 'ASSETS', '1205', '1000', 'Supplies Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1019, 'US-BASE', 'ASSETS', '1210', '1000', 'Work in Progress Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1020, 'US-BASE', 'ASSETS', '1215', '1000', 'Finished Goods Inventory', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1021, 'US-BASE', 'ASSETS', '1400', '1000', 'Prepaid Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1022, 'US-BASE', 'ASSETS', '1410', '1000', 'Employee Advances', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1023, 'US-BASE', 'ASSETS', '1420', '1000', 'Notes Receivable - Current', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1024, 'US-BASE', 'ASSETS', '1430', '1000', 'Prepaid Interest', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1025, 'US-BASE', 'ASSETS', '1470', '1000', 'Other Current Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1026, 'US-BASE', 'ASSETS', '1500', '1000', 'Furniture and Fixtures', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1027, 'US-BASE', 'ASSETS', '1510', '1000', 'Equipment', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1028, 'US-BASE', 'ASSETS', '1520', '1000', 'Vehicles', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1029, 'US-BASE', 'ASSETS', '1530', '1000', 'Other Depreciable Property', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1030, 'US-BASE', 'ASSETS', '1550', '1000', 'Buildings', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1031, 'US-BASE', 'ASSETS', '1560', '1000', 'Building Improvements', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1032, 'US-BASE', 'ASSETS', '1690', '1000', 'Land', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1033, 'US-BASE', 'ASSETS', '1700', '1000', 'Accumulated Depreciation, Furniture and Fixtures', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1034, 'US-BASE', 'ASSETS', '1710', '1000', 'Accumulated Depreciation, Equipment', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1035, 'US-BASE', 'ASSETS', '1720', '1000', 'Accumulated Depreciation, Vehicles', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1036, 'US-BASE', 'ASSETS', '1730', '1000', 'Accumulated Depreciation, Buildings', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1037, 'US-BASE', 'ASSETS', '1740', '1000', 'Accumulated Depreciation, Building Improvements', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1038, 'US-BASE', 'ASSETS', '1750', '1000', 'Accumulated Depreciation, Other', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1039, 'US-BASE', 'ASSETS', '1900', '1000', 'Deposits', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1040, 'US-BASE', 'ASSETS', '1910', '1000', 'Accumulated Amortization', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1041, 'US-BASE', 'ASSETS', '1920', '1000', 'Notes Receivable - Non-current', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1042, 'US-BASE', 'ASSETS', '1990', '1000', 'Other Non-current Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1043, 'US-BASE', 'LIABILITIES', '2100', '2000', 'Accounts Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1044, 'US-BASE', 'LIABILITIES', '2300', '2000', 'Accrued Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1045, 'US-BASE', 'LIABILITIES', '2310', '2000', 'Sales Tax Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1046, 'US-BASE', 'LIABILITIES', '2320', '2000', 'Wages Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1047, 'US-BASE', 'LIABILITIES', '2330', '2000', '401-K Deductions Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1048, 'US-BASE', 'LIABILITIES', '2335', '2000', 'Health Insurance Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1049, 'US-BASE', 'LIABILITIES', '2340', '2000', 'Federal Payroll Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1050, 'US-BASE', 'LIABILITIES', '2350', '2000', 'Federal Unemployment Tax Act - Tax Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1051, 'US-BASE', 'LIABILITIES', '2360', '2000', 'State Payroll Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1052, 'US-BASE', 'LIABILITIES', '2370', '2000', 'State Unemployment Tax Act - Tax Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1053, 'US-BASE', 'LIABILITIES', '2380', '2000', 'Local Payroll Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1054, 'US-BASE', 'LIABILITIES', '2390', '2000', 'Income Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1055, 'US-BASE', 'LIABILITIES', '2400', '2000', 'Other Taxes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1056, 'US-BASE', 'LIABILITIES', '2410', '2000', 'Employee Benefits Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1057, 'US-BASE', 'LIABILITIES', '2420', '2000', 'Current Portion of Long-term Debt', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1058, 'US-BASE', 'LIABILITIES', '2440', '2000', 'Deposits from Customers', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1059, 'US-BASE', 'LIABILITIES', '2480', '2000', 'Other Current Liabilities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1060, 'US-BASE', 'LIABILITIES', '2700', '2000', 'Notes Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1061, 'US-BASE', 'LIABILITIES', '2702', '2000', 'Land Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1062, 'US-BASE', 'LIABILITIES', '2704', '2000', 'Equipment Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1063, 'US-BASE', 'LIABILITIES', '2706', '2000', 'Vehicles Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1064, 'US-BASE', 'LIABILITIES', '2708', '2000', 'Bank Loans Payable', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1065, 'US-BASE', 'LIABILITIES', '2710', '2000', 'Deferred Revenue', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1066, 'US-BASE', 'LIABILITIES', '2740', '2000', 'Other Long-term Liabilities', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1067, 'US-BASE', 'CAPITAL', '3010', '3000', 'Stated Capital', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1068, 'US-BASE', 'CAPITAL', '3020', '3000', 'Capital Surplus', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1069, 'US-BASE', 'CAPITAL', '3030', '3000', 'Retained Earnings', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1070, 'US-BASE', 'INCOME', '4010', '4000', 'Product Sales', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1071, 'US-BASE', 'INCOME', '4060', '4000', 'Reimbursible Expenses', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1072, 'US-BASE', 'INCOME', '4061', '4000', 'Reimbursible Expenses - Meals and Entertainment ', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1073, 'US-BASE', 'INCOME', '4540', '4000', 'Finance Charge Income', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1074, 'US-BASE', 'INCOME', '4550', '4000', 'Shipping Charges Reimbursed', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1075, 'US-BASE', 'INCOME', '4800', '4000', 'Sales Returns and Allowances', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1076, 'US-BASE', 'INCOME', '4900', '4000', 'Sales Discounts', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1077, 'US-BASE', 'COGS', '5010', '5000', 'Product Cost', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1078, 'US-BASE', 'COGS', '5050', '5000', 'Raw Material Purchases', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1079, 'US-BASE', 'COGS', '5100', '5000', 'Direct Labor Costs', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1080, 'US-BASE', 'COGS', '5150', '5000', 'Indirect Labor Costs', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1081, 'US-BASE', 'COGS', '5200', '5000', 'Heat and Power', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1082, 'US-BASE', 'COGS', '5250', '5000', 'Commissions', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1083, 'US-BASE', 'COGS', '5300', '5000', 'Miscellaneous Factory Costs', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1084, 'US-BASE', 'COGS', '5700', '5000', 'Cost of Goods Sold, Salaries and Wages', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1085, 'US-BASE', 'COGS', '5730', '5000', 'Cost of Goods Sold, Contract Labor', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1086, 'US-BASE', 'COGS', '5750', '5000', 'Cost of Goods Sold, Freight', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1087, 'US-BASE', 'COGS', '5800', '5000', 'Cost of Goods Sold, Other', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1088, 'US-BASE', 'COGS', '5850', '5000', 'Inventory Adjustments', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1089, 'US-BASE', 'COGS', '5900', '5000', 'Purchase Returns and Allowances', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1090, 'US-BASE', 'COGS', '5950', '5000', 'Purchase Discounts', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1091, 'US-BASE', 'EXPENSE', '6010', '6000', 'Default Purchase Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1092, 'US-BASE', 'EXPENSE', '6020', '6000', 'Advertising Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1093, 'US-BASE', 'EXPENSE', '6050', '6000', 'Amortization Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1094, 'US-BASE', 'EXPENSE', '6100', '6000', 'Auto EXPENSE', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1095, 'US-BASE', 'EXPENSE', '6150', '6000', 'Bad Debt Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1096, 'US-BASE', 'EXPENSE', '6200', '6000', 'Bank Fees', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1097, 'US-BASE', 'EXPENSE', '6250', '6000', 'Cash Over and Short', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1098, 'US-BASE', 'EXPENSE', '6300', '6000', 'Charitable Contributions Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1099, 'US-BASE', 'EXPENSE', '6350', '6000', 'Commissions and Fees Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1100, 'US-BASE', 'EXPENSE', '6450', '6000', 'Dues and Subscriptions Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1101, 'US-BASE', 'EXPENSE', '6500', '6000', 'Employee Benefit Expense, Health Insurance', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1102, 'US-BASE', 'EXPENSE', '6510', '6000', 'Employee Benefit Expense, Pension Plans', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1103, 'US-BASE', 'EXPENSE', '6520', '6000', 'Employee Benefit Expense, Profit Sharing Plan', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1104, 'US-BASE', 'EXPENSE', '6530', '6000', 'Employee Benefit Expense, Other', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1105, 'US-BASE', 'EXPENSE', '6550', '6000', 'Freight Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1106, 'US-BASE', 'EXPENSE', '6600', '6000', 'Gifts Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1107, 'US-BASE', 'EXPENSE', '6650', '6000', 'Income Tax Expense, Federal', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1108, 'US-BASE', 'EXPENSE', '6660', '6000', 'Income Tax Expense, State', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1109, 'US-BASE', 'EXPENSE', '6670', '6000', 'Income Tax Expense, Local', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1110, 'US-BASE', 'EXPENSE', '6700', '6000', 'Insurance Expense, Product Liability', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1111, 'US-BASE', 'EXPENSE', '6710', '6000', 'Insurance Expense, Vehicle', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1112, 'US-BASE', 'EXPENSE', '6800', '6000', 'Laundry and Dry Cleaning Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1113, 'US-BASE', 'EXPENSE', '6850', '6000', 'Legal and Professional Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1114, 'US-BASE', 'EXPENSE', '6900', '6000', 'Licenses Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1115, 'US-BASE', 'EXPENSE', '6950', '6000', 'Loss on Non-sufficient Funds Checks', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1116, 'US-BASE', 'OTHER_REVENUE', '7010', '7000', 'Interest Income', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1117, 'US-BASE', 'OTHER_REVENUE', '7030', '7000', 'Other Income', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1118, 'US-BASE', 'OTHER_EXPENSES', '8010', '8000', 'Depreciation Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1119, 'US-BASE', 'OTHER_EXPENSES', '8020', '8000', 'Interest Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1120, 'US-BASE', 'OTHER_EXPENSES', '8030', '8000', 'Maintenance Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1121, 'US-BASE', 'OTHER_EXPENSES', '8050', '8000', 'Meals and Entertainment Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1122, 'US-BASE', 'OTHER_EXPENSES', '8100', '8000', 'Office Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1123, 'US-BASE', 'OTHER_EXPENSES', '8200', '8000', 'Payroll Tax Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1124, 'US-BASE', 'OTHER_EXPENSES', '8250', '8000', 'Penalties and Fines Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1125, 'US-BASE', 'OTHER_EXPENSES', '8300', '8000', 'Other Taxes', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1126, 'US-BASE', 'OTHER_EXPENSES', '8350', '8000', 'Postage Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1127, 'US-BASE', 'OTHER_EXPENSES', '8400', '8000', 'Rent or Lease Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1128, 'US-BASE', 'OTHER_EXPENSES', '8450', '8000', 'Repair and Maintenance Expense, Office', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1129, 'US-BASE', 'OTHER_EXPENSES', '8460', '8000', 'Repair and Maintenance Expense, Vehicle', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1130, 'US-BASE', 'OTHER_EXPENSES', '8550', '8000', 'Supplies Expense, Office', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1131, 'US-BASE', 'OTHER_EXPENSES', '8600', '8000', 'Telephone Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1132, 'US-BASE', 'OTHER_EXPENSES', '8620', '8000', 'Training Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1133, 'US-BASE', 'OTHER_EXPENSES', '8650', '8000', 'Travel Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1134, 'US-BASE', 'OTHER_EXPENSES', '8700', '8000', 'Salaries Expense, Officers', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1135, 'US-BASE', 'OTHER_EXPENSES', '8750', '8000', 'Wages Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1136, 'US-BASE', 'OTHER_EXPENSES', '8800', '8000', 'Utilities Expense', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1137, 'US-BASE', 'OTHER_EXPENSES', '8900', '8000', 'Gain/Loss on Sale of Assets', 1);
|
||||
INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 1138, 'US-BASE', 'OTHER_EXPENSES', '8950', '8000', 'Other Expense', 1);
|
||||
|
||||
@ -343,6 +343,7 @@ ALTER TABLE llx_commande_fournisseurdet ADD INDEX idx_commande_fournisseurdet_fk
|
||||
|
||||
|
||||
-- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode MODIFY COLUMN tracking varchar(255) NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_c_shipment_mode ALTER COLUMN tracking DROP NOT NULL;
|
||||
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'INPERSON', 'In person at your site', NULL, NULL, 0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (10,'FEDEX', 'Fedex', NULL, 'https://www.fedex.com/apps/fedextrack/index.html?tracknumbers={TRACKID}', 0);
|
||||
|
||||
@ -1,568 +0,0 @@
|
||||
--
|
||||
-- Be carefull to requests order.
|
||||
-- This file must be loaded by calling /install/index.php page
|
||||
-- when current version is 13.0.0 or higher.
|
||||
--
|
||||
-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y
|
||||
-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y
|
||||
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
|
||||
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
|
||||
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
|
||||
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
|
||||
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
||||
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
|
||||
-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field);
|
||||
-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table
|
||||
-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex
|
||||
-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||
-- To make pk to be auto increment (postgres):
|
||||
-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid;
|
||||
-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid);
|
||||
-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq');
|
||||
-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table;
|
||||
-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL;
|
||||
-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL;
|
||||
-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL;
|
||||
-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL;
|
||||
-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
|
||||
-- Note: fields with type BLOB/TEXT can't have default value.
|
||||
|
||||
|
||||
-- Missing in v12 or lower
|
||||
|
||||
ALTER TABLE llx_payment_salary MODIFY COLUMN ref varchar(30) NULL;
|
||||
ALTER TABLE llx_payment_various MODIFY COLUMN ref varchar(30) NULL;
|
||||
|
||||
ALTER TABLE llx_prelevement_bons ADD COLUMN type varchar(16) DEFAULT 'debit-order';
|
||||
|
||||
ALTER TABLE llx_prelevement_facture CHANGE COLUMN fk_facture_foun fk_facture_fourn integer NULL;
|
||||
|
||||
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture (fk_facture);
|
||||
ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture_fourn (fk_facture_fourn);
|
||||
|
||||
ALTER TABLE llx_document_model MODIFY COLUMN type varchar(64);
|
||||
|
||||
ALTER TABLE llx_bom_bom MODIFY COLUMN duration double(24,8);
|
||||
|
||||
ALTER TABLE llx_bom_bom_extrafields ADD INDEX idx_bom_bom_extrafields_fk_object (fk_object);
|
||||
|
||||
create table llx_mrp_mo_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_mrp_mo_extrafields DROP INDEX idx_fk_object;
|
||||
|
||||
ALTER TABLE llx_mrp_mo_extrafields ADD INDEX idx_mrp_mo_fk_object(fk_object);
|
||||
|
||||
|
||||
-- For v13
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (111,11, '0','0','No Sales Tax',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (112,11, '4','0','Sales Tax 4%',1);
|
||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (113,11, '6','0','Sales Tax 6%',1);
|
||||
|
||||
ALTER TABLE llx_bom_bom ADD COLUMN bomtype integer DEFAULT 0;
|
||||
|
||||
UPDATE llx_emailcollector_emailcollector SET ref = 'Collect_Ticket_Requests' WHERE ref = 'Collect_Ticket_Requets';
|
||||
UPDATE llx_emailcollector_emailcollector SET ref = 'Collect_Responses_In' WHERE ref = 'Collect_Responses';
|
||||
|
||||
|
||||
UPDATE llx_document_model set nom = 'standard' where nom = 'Standard' and type ='stock';
|
||||
UPDATE llx_document_model set nom = 'stdmovement', type = 'movement' where nom = 'StdMouvement' and type ='mouvement';
|
||||
|
||||
|
||||
UPDATE llx_const SET value = 0 WHERE name = 'FACTURE_TVAOPTION' and value = 'franchise';
|
||||
UPDATE llx_const SET value = 1 WHERE name = 'FACTURE_TVAOPTION' and value <> 'franchise' AND value <> '0' AND value <> '1';
|
||||
|
||||
ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME;
|
||||
|
||||
ALTER TABLE llx_website ADD COLUMN position integer DEFAULT 0;
|
||||
|
||||
ALTER TABLE llx_establishment ADD COLUMN ref varchar(30);
|
||||
ALTER TABLE llx_establishment ADD COLUMN label varchar(128);
|
||||
UPDATE llx_establishment SET ref = rowid WHERE ref IS NULL;
|
||||
ALTER TABLE llx_establishment MODIFY COLUMN ref varchar(30) NOT NULL;
|
||||
ALTER TABLE llx_establishment MODIFY COLUMN label varchar(128);
|
||||
|
||||
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0);
|
||||
|
||||
ALTER TABLE llx_subscription MODIFY COLUMN datef DATETIME;
|
||||
|
||||
ALTER TABLE llx_loan_schedule ADD column fk_payment_loan INTEGER;
|
||||
|
||||
|
||||
ALTER TABLE llx_user DROP COLUMN jabberid;
|
||||
ALTER TABLE llx_user DROP COLUMN skype;
|
||||
ALTER TABLE llx_user DROP COLUMN twitter;
|
||||
ALTER TABLE llx_user DROP COLUMN facebook;
|
||||
ALTER TABLE llx_user DROP COLUMN linkedin;
|
||||
ALTER TABLE llx_user DROP COLUMN instagram;
|
||||
ALTER TABLE llx_user DROP COLUMN snapchat;
|
||||
ALTER TABLE llx_user DROP COLUMN googleplus;
|
||||
ALTER TABLE llx_user DROP COLUMN youtube;
|
||||
ALTER TABLE llx_user DROP COLUMN whatsapp;
|
||||
|
||||
ALTER TABLE llx_user ADD COLUMN datelastpassvalidation datetime;
|
||||
ALTER TABLE llx_user ADD COLUMN datestartvalidity datetime;
|
||||
ALTER TABLE llx_user ADD COLUMN dateendvalidity datetime;
|
||||
|
||||
ALTER TABLE llx_user ADD COLUMN idpers1 varchar(128);
|
||||
ALTER TABLE llx_user ADD COLUMN idpers2 varchar(128);
|
||||
ALTER TABLE llx_user ADD COLUMN idpers3 varchar(128);
|
||||
|
||||
|
||||
-- Intracomm Report
|
||||
CREATE TABLE llx_c_transport_mode (
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
code varchar(3) NOT NULL,
|
||||
label varchar(255) NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('ROU', 'Transport par route', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('AIR', 'Transport par air', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('POS', 'Envois postaux', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('OLE', 'Installations de transport fixe (oléoduc)', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('NAV', 'Transport par navigation intérieure', 1);
|
||||
INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('PRO', 'Propulsion propre', 1);
|
||||
|
||||
ALTER TABLE llx_facture ADD COLUMN fk_transport_mode integer after location_incoterms;
|
||||
ALTER TABLE llx_facture_fourn ADD COLUMN fk_transport_mode integer after location_incoterms;
|
||||
|
||||
ALTER TABLE llx_societe ADD COLUMN transport_mode tinyint after cond_reglement;
|
||||
ALTER TABLE llx_societe ADD COLUMN transport_mode_supplier tinyint after cond_reglement_supplier;
|
||||
|
||||
CREATE TABLE llx_intracommreport
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
|
||||
ref varchar(30) NOT NULL, -- report reference number
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
type_declaration varchar(32),
|
||||
periods varchar(32),
|
||||
mode varchar(32),
|
||||
content_xml text,
|
||||
type_export varchar(10),
|
||||
datec datetime,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_incoterms ADD COLUMN label varchar(100) NULL;
|
||||
|
||||
CREATE TABLE llx_recruitment_recruitmentjobposition(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||
entity INTEGER DEFAULT 1 NOT NULL,
|
||||
label varchar(255) NOT NULL,
|
||||
qty integer DEFAULT 1 NOT NULL,
|
||||
fk_soc integer,
|
||||
fk_project integer,
|
||||
fk_user_recruiter integer,
|
||||
fk_user_supervisor integer,
|
||||
fk_establishment integer,
|
||||
date_planned date,
|
||||
remuneration_suggested varchar(255),
|
||||
description text,
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
last_main_doc varchar(255),
|
||||
import_key varchar(14),
|
||||
model_pdf varchar(255),
|
||||
status smallint NOT NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_rowid (rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_ref (ref);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_project (fk_project);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_recruiter FOREIGN KEY (fk_user_recruiter) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_supervisor FOREIGN KEY (fk_user_supervisor) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_establishment FOREIGN KEY (fk_establishment) REFERENCES llx_establishment(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_status (status);
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN email_recruiter varchar(255);
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN entity INTEGER DEFAULT 1 NOT NULL;
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN remuneration_suggested varchar(255);
|
||||
|
||||
create table llx_recruitment_recruitmentjobposition_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentjobposition_extrafields ADD INDEX idx_recruitmentjobposition_fk_object(fk_object);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE llx_recruitment_recruitmentcandidature(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
entity integer NOT NULL DEFAULT 1,
|
||||
fk_recruitmentjobposition INTEGER NULL,
|
||||
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
|
||||
description text,
|
||||
note_public text,
|
||||
note_private text,
|
||||
date_creation datetime NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer NOT NULL,
|
||||
fk_user_modif integer,
|
||||
import_key varchar(14),
|
||||
model_pdf varchar(255),
|
||||
status smallint NOT NULL,
|
||||
firstname varchar(128),
|
||||
lastname varchar(128),
|
||||
email varchar(255),
|
||||
phone varchar(64),
|
||||
date_birth date,
|
||||
remuneration_requested integer,
|
||||
remuneration_proposed integer,
|
||||
email_msgid varchar(255),
|
||||
fk_recruitment_origin INTEGER NULL
|
||||
-- END MODULEBUILDER FIELDS
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN entity integer NOT NULL DEFAULT 1;
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN email_msgid varchar(255);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN fk_recruitment_origin INTEGER NULL;
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN date_birth date;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_rowid (rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_ref (ref);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_recruitment_recruitmentcandidature_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_status (status);
|
||||
|
||||
create table llx_recruitment_recruitmentcandidature_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature_extrafields ADD INDEX idx_recruitmentcandidature_fk_object(fk_object);
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid);
|
||||
|
||||
|
||||
ALTER TABLE llx_product_attribute ADD COLUMN ref_ext VARCHAR(255) after ref;
|
||||
ALTER TABLE llx_product_attribute_combination ADD COLUMN variation_ref_ext varchar(255) AFTER variation_weight;
|
||||
|
||||
|
||||
CREATE TABLE llx_product_attribute_combination_price_level
|
||||
(
|
||||
rowid INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
|
||||
fk_product_attribute_combination INTEGER DEFAULT 1 NOT NULL,
|
||||
fk_price_level INTEGER DEFAULT 1 NOT NULL,
|
||||
variation_price DOUBLE(24,8) NOT NULL,
|
||||
variation_price_percentage INTEGER NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_product_attribute_combination_price_level ADD UNIQUE( fk_product_attribute_combination, fk_price_level);
|
||||
|
||||
|
||||
|
||||
-- Add dictionary for prospect level and action commercial on contacts (Using this is not recommanded)
|
||||
|
||||
create table llx_c_prospectcontactlevel
|
||||
(
|
||||
code varchar(12) PRIMARY KEY,
|
||||
label varchar(30),
|
||||
sortorder smallint,
|
||||
active smallint DEFAULT 1 NOT NULL,
|
||||
module varchar(32) NULL
|
||||
) ENGINE=innodb;
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1);
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2);
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3);
|
||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_HIGH', 'High', 4);
|
||||
|
||||
create table llx_c_stcommcontact
|
||||
(
|
||||
id integer PRIMARY KEY,
|
||||
code varchar(12) NOT NULL,
|
||||
libelle varchar(30),
|
||||
picto varchar(128),
|
||||
active tinyint default 1 NOT NULL
|
||||
)ENGINE=innodb;
|
||||
ALTER TABLE llx_c_stcommcontact ADD UNIQUE INDEX uk_c_stcommcontact(code);
|
||||
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values (-1, 'ST_NO', 'Do not contact');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 0, 'ST_NEVER', 'Never contacted');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 1, 'ST_TODO', 'To contact');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 2, 'ST_PEND', 'Contact in progress');
|
||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 3, 'ST_DONE', 'Contacted');
|
||||
|
||||
ALTER TABLE llx_socpeople ADD COLUMN fk_prospectcontactlevel varchar(12) AFTER priv;
|
||||
ALTER TABLE llx_socpeople ADD COLUMN fk_stcommcontact integer DEFAULT 0 NOT NULL AFTER fk_prospectcontactlevel;
|
||||
|
||||
create table llx_c_recruitment_origin
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
code varchar(32) NOT NULL,
|
||||
label varchar(64) NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid);
|
||||
|
||||
|
||||
ALTER TABLE llx_product MODIFY COLUMN seuil_stock_alerte float;
|
||||
ALTER TABLE llx_product MODIFY COLUMN desiredstock float;
|
||||
|
||||
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN seuil_stock_alerte float;
|
||||
ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float;
|
||||
|
||||
ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL;
|
||||
|
||||
ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255);
|
||||
ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255);
|
||||
ALTER TABLE llx_actioncomm ADD COLUMN reply_to varchar(255);
|
||||
|
||||
ALTER TABLE llx_paiement ADD pos_change DOUBLE(24,8) DEFAULT 0 AFTER fk_export_compta;
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52);
|
||||
|
||||
ALTER TABLE llx_opensurvey_sondage CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
|
||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswer)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||
|
||||
ALTER TABLE llx_c_action_trigger MODIFY COLUMN code varchar(64) NOT NULL;
|
||||
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514);
|
||||
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516);
|
||||
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN entity integer NOT NULL DEFAULT 1;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_actioncomm integer NOT NULL;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_email_template integer;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD COLUMN lasterror varchar(128) NULL;
|
||||
|
||||
ALTER TABLE llx_actioncomm_reminder DROP INDEX uk_actioncomm_reminder_unique;
|
||||
ALTER TABLE llx_actioncomm_reminder ADD UNIQUE uk_actioncomm_reminder_unique (fk_user, typeremind, offsetvalue, offsetunit, fk_actioncomm);
|
||||
|
||||
ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_status (status);
|
||||
|
||||
|
||||
ALTER TABLE llx_inventorydet ADD UNIQUE uk_inventorydet(fk_inventory, fk_warehouse, fk_product, batch);
|
||||
|
||||
ALTER TABLE llx_commandedet ADD COLUMN ref_ext varchar(255) AFTER label;
|
||||
ALTER TABLE llx_facturedet ADD COLUMN ref_ext varchar(255) AFTER multicurrency_total_ttc;
|
||||
|
||||
ALTER TABLE llx_c_ticket_category ADD COLUMN fk_parent integer DEFAULT 0 NOT NULL;
|
||||
ALTER TABLE llx_c_ticket_category ADD COLUMN force_severity varchar(32) NULL;
|
||||
|
||||
ALTER TABLE llx_c_ticket_severity CHANGE color color VARCHAR(10) NULL;
|
||||
|
||||
ALTER TABLE llx_expensereport ADD COLUMN fk_user_creat integer NULL;
|
||||
|
||||
ALTER TABLE llx_expensereport_ik ADD COLUMN ikoffset double DEFAULT 0 NOT NULL;
|
||||
|
||||
ALTER TABLE llx_paiement ADD COLUMN ref_ext varchar(255) AFTER ref;
|
||||
|
||||
ALTER TABLE llx_bank ADD COLUMN origin_id integer;
|
||||
ALTER TABLE llx_bank ADD COLUMN origin_type varchar(64) NULL;
|
||||
ALTER TABLE llx_bank ADD COLUMN import_key varchar(14);
|
||||
|
||||
ALTER TABLE llx_menu MODIFY COLUMN enabled text;
|
||||
|
||||
CREATE TABLE llx_ecm_files_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_ecm_files_extrafields ADD INDEX idx_ecm_files_extrafields (fk_object);
|
||||
ALTER TABLE llx_ecm_files ADD COLUMN note_private text AFTER fk_user_m;
|
||||
ALTER TABLE llx_ecm_files ADD COLUMN note_public text AFTER note_private;
|
||||
|
||||
CREATE TABLE llx_ecm_directories_extrafields
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_object integer NOT NULL,
|
||||
import_key varchar(14) -- import key
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_ecm_directories_extrafields ADD INDEX idx_ecm_directories_extrafields (fk_object);
|
||||
ALTER TABLE llx_ecm_directories ADD COLUMN note_private text AFTER fk_user_m;
|
||||
ALTER TABLE llx_ecm_directories ADD COLUMN note_public text AFTER note_private;
|
||||
|
||||
ALTER TABLE llx_website_page ADD COLUMN allowed_in_frames integer DEFAULT 0;
|
||||
ALTER TABLE llx_website_page ADD COLUMN object_type varchar(255);
|
||||
ALTER TABLE llx_website_page ADD COLUMN fk_object varchar(255);
|
||||
|
||||
DELETE FROM llx_const WHERE name in ('MAIN_INCLUDE_ZERO_VAT_IN_REPORTS');
|
||||
|
||||
UPDATE llx_projet_task_time SET tms = null WHERE tms = 0;
|
||||
ALTER TABLE llx_projet_task_time MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||
|
||||
ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime;
|
||||
|
||||
|
||||
DELETE FROM llx_user_rights WHERE fk_id IN (SELECT id FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous');
|
||||
DELETE FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous';
|
||||
UPDATE llx_rights_def set perms = 'readall' WHERE perms = 'read_all' and module = 'holiday';
|
||||
|
||||
CREATE TABLE llx_c_product_nature (
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
code tinyint NOT NULL,
|
||||
label varchar(100),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_product_nature ADD UNIQUE INDEX uk_c_product_nature(code, active);
|
||||
|
||||
INSERT INTO llx_c_product_nature (code, label, active) VALUES (0, 'RowMaterial', 1);
|
||||
INSERT INTO llx_c_product_nature (code, label, active) VALUES (1, 'Finished', 1);
|
||||
|
||||
ALTER TABLE llx_product MODIFY COLUMN finished tinyint DEFAULT NULL;
|
||||
ALTER TABLE llx_product ADD CONSTRAINT fk_product_finished FOREIGN KEY (finished) REFERENCES llx_c_product_nature (code);
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);
|
||||
ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);
|
||||
|
||||
=======
|
||||
>>>>>>> a93227ac2f04c80c76b517215d1d422168607fb1
|
||||
-- MIGRATION TO DO AFTER RENAMING AN OBJECT
|
||||
|
||||
-- drop constraint
|
||||
ALTER TABLE llx_livraison DROP FOREIGN KEY fk_livraison_fk_soc;
|
||||
ALTER TABLE llx_livraison DROP FOREIGN KEY fk_livraison_fk_user_author;
|
||||
ALTER TABLE llx_livraison DROP FOREIGN KEY fk_livraison_fk_user_valid;
|
||||
|
||||
-- rename Table
|
||||
ALTER TABLE llx_livraison RENAME TO llx_delivery;
|
||||
ALTER TABLE llx_livraison_extrafields RENAME TO llx_delivery_extrafields;
|
||||
ALTER TABLE llx_livraisondet RENAME TO llx_deliverydet;
|
||||
ALTER TABLE llx_livraisondet_extrafields RENAME TO llx_deliverydet_extrafields;
|
||||
|
||||
-- rename index
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_uk_ref;
|
||||
ALTER TABLE llx_delivery ADD UNIQUE INDEX idx_delivery_uk_ref (ref, entity);
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_fk_soc;
|
||||
ALTER TABLE llx_delivery ADD INDEX idx_delivery_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_fk_user_author;
|
||||
ALTER TABLE llx_delivery ADD INDEX idx_delivery_fk_user_author (fk_user_author);
|
||||
ALTER TABLE llx_delivery DROP INDEX idx_livraison_fk_user_valid;
|
||||
ALTER TABLE llx_delivery ADD INDEX idx_delivery_fk_user_valid (fk_user_valid);
|
||||
|
||||
-- drop constraint
|
||||
ALTER TABLE llx_delivery DROP FOREIGN KEY fk_livraison_fk_soc;
|
||||
ALTER TABLE llx_delivery DROP FOREIGN KEY fk_livraison_fk_user_author;
|
||||
ALTER TABLE llx_delivery DROP FOREIGN KEY fk_livraison_fk_user_valid;
|
||||
|
||||
-- add constraint
|
||||
ALTER TABLE llx_delivery ADD CONSTRAINT fk_delivery_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
ALTER TABLE llx_delivery ADD CONSTRAINT fk_delivery_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_delivery ADD CONSTRAINT fk_delivery_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||
|
||||
ALTER TABLE llx_deliverydet DROP FOREIGN KEY fk_livraisondet_fk_livraison;
|
||||
ALTER TABLE llx_deliverydet DROP INDEX idx_livraisondet_fk_expedition;
|
||||
ALTER TABLE llx_deliverydet CHANGE COLUMN fk_livraison fk_delivery integer;
|
||||
ALTER TABLE llx_deliverydet ADD INDEX idx_deliverydet_fk_delivery (fk_delivery);
|
||||
ALTER TABLE llx_deliverydet ADD CONSTRAINT fk_deliverydet_fk_delivery FOREIGN KEY (fk_delivery) REFERENCES llx_delivery (rowid);
|
||||
|
||||
UPDATE llx_extrafields SET elementtype = 'delivery' WHERE elementtype = 'livraison';
|
||||
UPDATE llx_extrafields SET elementtype = 'deliverydet' WHERE elementtype = 'livraisondet';
|
||||
|
||||
-- update llx_ecm_files
|
||||
UPDATE llx_ecm_files SET src_object_type = 'delivery' WHERE src_object_type = 'livraison';
|
||||
|
||||
-- update llx_links
|
||||
UPDATE llx_links SET objecttype = 'delivery' WHERE objecttype = 'livraison';
|
||||
|
||||
-- update llx_document_model
|
||||
UPDATE llx_document_model SET type = 'delivery' WHERE type = 'livraison';
|
||||
|
||||
-- update llx_object_lang
|
||||
UPDATE llx_object_lang SET type_object = 'delivery' WHERE type_object = 'livraison';
|
||||
|
||||
-- update llx_c_type_contact
|
||||
UPDATE llx_c_type_contact SET element = 'delivery' WHERE element = 'livraison';
|
||||
|
||||
-- update llx_c_email_template
|
||||
UPDATE llx_c_email_template SET type_template = 'delivery' WHERE type_template = 'livraison';
|
||||
|
||||
-- update llx_element_element
|
||||
UPDATE llx_element_element SET sourcetype = 'delivery' WHERE sourcetype = 'livraison';
|
||||
UPDATE llx_element_element SET targettype = 'delivery' WHERE targettype = 'livraison';
|
||||
|
||||
-- update llx_actioncomm
|
||||
UPDATE llx_actioncomm SET element_type = 'delivery' WHERE element_type = 'livraison';
|
||||
|
||||
-- update llx_const
|
||||
UPDATE llx_const set name = 'DELIVERY_ADDON_NUMBER' WHERE name = 'LIVRAISON_ADDON_NUMBER';
|
||||
UPDATE llx_const set value = 'mod_delivery_jade' WHERE value = 'mod_livraison_jade' AND name = 'DELIVERY_ADDON_NUMBER';
|
||||
UPDATE llx_const set value = 'mod_delivery_saphir' WHERE value = 'mod_livraison_saphir' AND name = 'DELIVERY_ADDON_NUMBER';
|
||||
|
||||
-- update llx_rights_def
|
||||
UPDATE llx_rights_def set perms = 'delivery' WHERE perms = 'livraison' and module = 'expedition';
|
||||
UPDATE llx_rights_def set perms = 'delivery_advance' WHERE perms = 'livraison_advance' and module = 'expedition';
|
||||
|
||||
|
||||
ALTER TABLE llx_commande_fournisseurdet ADD INDEX idx_commande_fournisseurdet_fk_commande (fk_commande);
|
||||
ALTER TABLE llx_commande_fournisseurdet ADD INDEX idx_commande_fournisseurdet_fk_product (fk_product);
|
||||
|
||||
|
||||
CREATE TABLE llx_zapier_hook(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL,
|
||||
url varchar(255),
|
||||
event varchar(255),
|
||||
module varchar(128),
|
||||
action varchar(128),
|
||||
status integer,
|
||||
date_creation datetime NOT NULL,
|
||||
fk_user integer NOT NULL,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
import_key varchar(14)
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
||||
CREATE TABLE llx_session(
|
||||
session_id varchar(50) PRIMARY KEY,
|
||||
session_variable text,
|
||||
last_accessed datetime NOT NULL,
|
||||
fk_user integer NOT NULL,
|
||||
remote_ip varchar(64) NULL,
|
||||
user_agent varchar(128) NULL
|
||||
) ENGINE=innodb;
|
||||
|
||||
INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES(1, 'github', 'Github', 'https://github.com/{socialid}', 'fa-github', 1);
|
||||
|
||||
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_funnel_of_prospection.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_funnel_of_prospection.php' AND entity = 1);
|
||||
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_customers_outstanding_bill_reached.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_customers_outstanding_bill_reached.php' AND entity = 1);
|
||||
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_scheduled_jobs.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_scheduled_jobs.php' AND entity = 1);
|
||||
|
||||
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64);
|
||||
|
||||
ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL;
|
||||
|
||||
@ -47,11 +47,20 @@ ALTER TABLE llx_bank_account ADD COLUMN ics_transfer varchar(32) NULL;
|
||||
|
||||
ALTER TABLE llx_facture MODIFY COLUMN date_valid DATETIME NULL DEFAULT NULL;
|
||||
|
||||
|
||||
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_dolibarr_state_board.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_dolibarr_state_board.php' AND entity = 1);
|
||||
|
||||
|
||||
ALTER TABLE llx_website ADD COLUMN lastaccess datetime NULL;
|
||||
ALTER TABLE llx_website ADD COLUMN pageviews_month BIGINT UNSIGNED DEFAULT 0;
|
||||
ALTER TABLE llx_website ADD COLUMN pageviews_total BIGINT UNSIGNED DEFAULT 0;
|
||||
|
||||
|
||||
-- Drop foreign key with bad name or not required
|
||||
ALTER TABLE DROP FOREIGN KEY llx_workstation_workstation_fk_user_creat;
|
||||
ALTER TABLE DROP FOREIGN KEY llx_propal_fk_warehouse;
|
||||
|
||||
|
||||
CREATE TABLE llx_workstation_workstation(
|
||||
-- BEGIN MODULEBUILDER FIELDS
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
@ -75,7 +84,7 @@ CREATE TABLE llx_workstation_workstation(
|
||||
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_rowid (rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_ref (ref);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT llx_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status);
|
||||
|
||||
CREATE TABLE llx_workstation_workstation_resource(
|
||||
@ -93,10 +102,15 @@ CREATE TABLE llx_workstation_workstation_usergroup(
|
||||
) ENGINE=innodb;
|
||||
|
||||
|
||||
ALTER TABLE llx_propal ADD COLUMN fk_warehouse integer DEFAULT NULL AFTER fk_shipping_method;
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT llx_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
ALTER TABLE llx_propal ADD INDEX idx_propal_fk_warehouse(fk_warehouse);
|
||||
|
||||
|
||||
ALTER TABLE llx_product_customer_price ADD COLUMN ref_customer varchar(30);
|
||||
ALTER TABLE llx_product_customer_price_log ADD COLUMN ref_customer varchar(30);
|
||||
|
||||
ALTER TABLE llx_propal ADD COLUMN fk_warehouse integer DEFAULT NULL AFTER fk_shipping_method;
|
||||
--ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
ALTER TABLE llx_propal ADD INDEX idx_propal_fk_warehouse(fk_warehouse);
|
||||
|
||||
ALTER TABLE llx_societe DROP INDEX idx_societe_entrepot;
|
||||
ALTER TABLE llx_societe CHANGE fk_entrepot fk_warehouse INTEGER DEFAULT NULL;
|
||||
--ALTER TABLE llx_societe ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse);
|
||||
|
||||
|
||||
@ -35,4 +35,4 @@ ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_author FOREIGN KEY (fk_u
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_user_cloture FOREIGN KEY (fk_user_cloture) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
|
||||
ALTER TABLE llx_propal ADD CONSTRAINT llx_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
--ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
|
||||
|
||||
@ -33,7 +33,7 @@ ALTER TABLE llx_societe ADD INDEX idx_societe_prospectlevel(fk_prospectlevel);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_typent(fk_typent);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_forme_juridique(fk_forme_juridique);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_shipping_method(fk_shipping_method);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_entrepot(fk_entrepot);
|
||||
ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse);
|
||||
|
||||
-- ALTER TABLE llx_societe ADD FOREIGN KEY fk_prospectlevel llx_c_prospectlevel(code);
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ create table llx_societe
|
||||
logo varchar(255) DEFAULT NULL,
|
||||
logo_squarred varchar(255) DEFAULT NULL,
|
||||
canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default)
|
||||
fk_entrepot integer DEFAULT 0, -- if we need a link between third party and warehouse
|
||||
fk_entrepot integer DEFAULT NULL, -- if we need a link between third party and warehouse
|
||||
webservices_url varchar(255), -- supplier webservice url
|
||||
webservices_key varchar(128), -- supplier webservice key
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@
|
||||
-- BEGIN MODULEBUILDER INDEXES
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_rowid (rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_ref (ref);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT llx_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
|
||||
ALTER TABLE llx_workstation_workstation ADD INDEX idx_workstation_workstation_status (status);
|
||||
-- END MODULEBUILDER INDEXES
|
||||
|
||||
--ALTER TABLE llx_workstation_workstation ADD UNIQUE INDEX uk_workstation_workstation_fieldxy(fieldx, fieldy);
|
||||
|
||||
--ALTER TABLE llx_workstation_workstation ADD CONSTRAINT llx_workstation_workstation_fk_field FOREIGN KEY (fk_field) REFERENCES llx_workstation_myotherobject(rowid);
|
||||
--ALTER TABLE llx_workstation_workstation ADD CONSTRAINT fk_workstation_workstation_fk_field FOREIGN KEY (fk_field) REFERENCES llx_workstation_myotherobject(rowid);
|
||||
|
||||
|
||||
@ -1598,8 +1598,13 @@ ServiceSetup=Services module setup
|
||||
ProductServiceSetup=Products and Services modules setup
|
||||
NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit)
|
||||
ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup)
|
||||
DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms
|
||||
OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document
|
||||
AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product
|
||||
DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically.
|
||||
DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents
|
||||
MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in the language of the third party
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user)
|
||||
UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
||||
UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient)
|
||||
SetDefaultBarcodeTypeProducts=Default barcode type to use for products
|
||||
|
||||
@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required)
|
||||
Notify_EXPENSE_REPORT_APPROVE=Expense report approved
|
||||
Notify_HOLIDAY_VALIDATE=Leave request validated (approval required)
|
||||
Notify_HOLIDAY_APPROVE=Leave request approved
|
||||
Notify_ACTION_CREATE=Added action to Agenda
|
||||
SeeModuleSetup=See setup of module %s
|
||||
NbOfAttachedFiles=Number of attached files/documents
|
||||
TotalSizeOfAttachedFiles=Total size of attached files/documents
|
||||
@ -215,6 +216,7 @@ EMailTextExpenseReportValidated=Expense report %s has been validated.
|
||||
EMailTextExpenseReportApproved=Expense report %s has been approved.
|
||||
EMailTextHolidayValidated=Leave request %s has been validated.
|
||||
EMailTextHolidayApproved=Leave request %s has been approved.
|
||||
EMailTextActionAdded=The action %s has been added to the Agenda.
|
||||
ImportedWithSet=Importation data set
|
||||
DolibarrNotification=Automatic notification
|
||||
ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing...
|
||||
|
||||
@ -108,7 +108,7 @@ FillWithLastServiceDates=Fill with last service line dates
|
||||
MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment)
|
||||
MultiPricesNumPrices=Number of prices
|
||||
DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices
|
||||
AssociatedProductsAbility=Enable Kits (set of other products)
|
||||
AssociatedProductsAbility=Enable Kits (set of several products)
|
||||
VariantsAbility=Enable Variants (variations of products, for example color, size)
|
||||
AssociatedProducts=Kits
|
||||
AssociatedProductsNumber=Number of products composing this kit
|
||||
|
||||
@ -76,15 +76,16 @@ MyActivities=My tasks/activities
|
||||
MyProjects=My projects
|
||||
MyProjectsArea=My projects Area
|
||||
DurationEffective=Effective duration
|
||||
ProgressDeclared=Declared progress
|
||||
ProgressDeclared=Declared real progress
|
||||
TaskProgressSummary=Task progress
|
||||
CurentlyOpenedTasks=Curently open tasks
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression
|
||||
ProgressCalculated=Calculated progress
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption
|
||||
ProgressCalculated=Progress on consumption
|
||||
WhichIamLinkedTo=which I'm linked to
|
||||
WhichIamLinkedToProject=which I'm linked to project
|
||||
Time=Time
|
||||
TimeConsumed=Consumed
|
||||
ListOfTasks=List of tasks
|
||||
GoToListOfTimeConsumed=Go to list of time consumed
|
||||
GanttView=Gantt View
|
||||
|
||||
@ -1598,8 +1598,13 @@ ServiceSetup=خدمات وحدة الإعداد
|
||||
ProductServiceSetup=منتجات وخدمات إعداد وحدات
|
||||
NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit)
|
||||
ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup)
|
||||
DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms
|
||||
OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document
|
||||
AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product
|
||||
DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically.
|
||||
DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents
|
||||
MergePropalProductCard=في تنشيط المنتج / الخدمة المرفقة التبويب ملفات خيار دمج المستند المنتج PDF إلى اقتراح PDF دازور إذا كان المنتج / الخدمة في الاقتراح
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in the language of the third party
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user)
|
||||
UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
||||
UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient)
|
||||
SetDefaultBarcodeTypeProducts=النوع الافتراضي لاستخدام الباركود للمنتجات
|
||||
|
||||
@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required)
|
||||
Notify_EXPENSE_REPORT_APPROVE=Expense report approved
|
||||
Notify_HOLIDAY_VALIDATE=Leave request validated (approval required)
|
||||
Notify_HOLIDAY_APPROVE=Leave request approved
|
||||
Notify_ACTION_CREATE=Added action to Agenda
|
||||
SeeModuleSetup=انظر إعداد وحدة٪ الصورة
|
||||
NbOfAttachedFiles=عدد الملفات المرفقة / وثائق
|
||||
TotalSizeOfAttachedFiles=اجمالى حجم الملفات المرفقة / وثائق
|
||||
@ -215,6 +216,7 @@ EMailTextExpenseReportValidated=Expense report %s has been validated.
|
||||
EMailTextExpenseReportApproved=Expense report %s has been approved.
|
||||
EMailTextHolidayValidated=Leave request %s has been validated.
|
||||
EMailTextHolidayApproved=Leave request %s has been approved.
|
||||
EMailTextActionAdded=The action %s has been added to the Agenda.
|
||||
ImportedWithSet=استيراد مجموعة البيانات
|
||||
DolibarrNotification=إشعار تلقائي
|
||||
ResizeDesc=أدخل عرض جديدة <b>أو</b> ارتفاع جديد. وستبقى نسبة خلال تغيير حجم...
|
||||
|
||||
@ -108,7 +108,7 @@ FillWithLastServiceDates=Fill with last service line dates
|
||||
MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment)
|
||||
MultiPricesNumPrices=عدد من السعر
|
||||
DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices
|
||||
AssociatedProductsAbility=Enable Kits (set of other products)
|
||||
AssociatedProductsAbility=Enable Kits (set of several products)
|
||||
VariantsAbility=Enable Variants (variations of products, for example color, size)
|
||||
AssociatedProducts=Kits
|
||||
AssociatedProductsNumber=Number of products composing this kit
|
||||
|
||||
@ -76,15 +76,16 @@ MyActivities=بلدي المهام والأنشطة
|
||||
MyProjects=بلدي المشاريع
|
||||
MyProjectsArea=My projects Area
|
||||
DurationEffective=فعالة لمدة
|
||||
ProgressDeclared=أعلن التقدم
|
||||
ProgressDeclared=Declared real progress
|
||||
TaskProgressSummary=Task progress
|
||||
CurentlyOpenedTasks=Curently open tasks
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression
|
||||
ProgressCalculated=تقدم تحسب
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption
|
||||
ProgressCalculated=Progress on consumption
|
||||
WhichIamLinkedTo=which I'm linked to
|
||||
WhichIamLinkedToProject=which I'm linked to project
|
||||
Time=وقت
|
||||
TimeConsumed=Consumed
|
||||
ListOfTasks=List of tasks
|
||||
GoToListOfTimeConsumed=Go to list of time consumed
|
||||
GanttView=Gantt View
|
||||
|
||||
@ -1598,8 +1598,13 @@ ServiceSetup=Services module setup
|
||||
ProductServiceSetup=Products and Services modules setup
|
||||
NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit)
|
||||
ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup)
|
||||
DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms
|
||||
OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document
|
||||
AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product
|
||||
DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically.
|
||||
DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents
|
||||
MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in the language of the third party
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user)
|
||||
UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
||||
UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient)
|
||||
SetDefaultBarcodeTypeProducts=Default barcode type to use for products
|
||||
|
||||
@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required)
|
||||
Notify_EXPENSE_REPORT_APPROVE=Expense report approved
|
||||
Notify_HOLIDAY_VALIDATE=Leave request validated (approval required)
|
||||
Notify_HOLIDAY_APPROVE=Leave request approved
|
||||
Notify_ACTION_CREATE=Added action to Agenda
|
||||
SeeModuleSetup=See setup of module %s
|
||||
NbOfAttachedFiles=Number of attached files/documents
|
||||
TotalSizeOfAttachedFiles=Total size of attached files/documents
|
||||
@ -215,6 +216,7 @@ EMailTextExpenseReportValidated=Expense report %s has been validated.
|
||||
EMailTextExpenseReportApproved=Expense report %s has been approved.
|
||||
EMailTextHolidayValidated=Leave request %s has been validated.
|
||||
EMailTextHolidayApproved=Leave request %s has been approved.
|
||||
EMailTextActionAdded=The action %s has been added to the Agenda.
|
||||
ImportedWithSet=Importation data set
|
||||
DolibarrNotification=Automatic notification
|
||||
ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing...
|
||||
|
||||
@ -108,7 +108,7 @@ FillWithLastServiceDates=Fill with last service line dates
|
||||
MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment)
|
||||
MultiPricesNumPrices=Number of prices
|
||||
DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices
|
||||
AssociatedProductsAbility=Enable Kits (set of other products)
|
||||
AssociatedProductsAbility=Enable Kits (set of several products)
|
||||
VariantsAbility=Enable Variants (variations of products, for example color, size)
|
||||
AssociatedProducts=Kits
|
||||
AssociatedProductsNumber=Number of products composing this kit
|
||||
|
||||
@ -76,15 +76,16 @@ MyActivities=My tasks/activities
|
||||
MyProjects=My projects
|
||||
MyProjectsArea=My projects Area
|
||||
DurationEffective=Effective duration
|
||||
ProgressDeclared=Declared progress
|
||||
ProgressDeclared=Declared real progress
|
||||
TaskProgressSummary=Task progress
|
||||
CurentlyOpenedTasks=Curently open tasks
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression
|
||||
ProgressCalculated=Calculated progress
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption
|
||||
ProgressCalculated=Progress on consumption
|
||||
WhichIamLinkedTo=which I'm linked to
|
||||
WhichIamLinkedToProject=which I'm linked to project
|
||||
Time=Time
|
||||
TimeConsumed=Consumed
|
||||
ListOfTasks=List of tasks
|
||||
GoToListOfTimeConsumed=Go to list of time consumed
|
||||
GanttView=Gantt View
|
||||
|
||||
@ -1598,8 +1598,13 @@ ServiceSetup=Настройка на модулa за услуги
|
||||
ProductServiceSetup=Настройка на модула за продукти и услуги
|
||||
NumberOfProductShowInSelect=Максимален брой продукти за показване в комбинирани списъци за избор (0 = без ограничение)
|
||||
ViewProductDescInFormAbility=Показване на описанията на продуктите във формуляри (в противен случай се показват в изскачащи подсказки)
|
||||
DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms
|
||||
OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document
|
||||
AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product
|
||||
DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically.
|
||||
DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents
|
||||
MergePropalProductCard=Активиране на опция за обединяване на продуктови PDF документи налични в секцията "Прикачени файлове и документи" в раздела "Свързани файлове" на търговско предложение, ако се продукт / услуга в предложението и модел за документи Azur
|
||||
ViewProductDescInThirdpartyLanguageAbility=Показване на описанията на продуктите в езика на контрагента
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user)
|
||||
UseSearchToSelectProductTooltip=Също така, ако имате голям брой продукти (> 100 000) може да увеличите скоростта като зададете константата PRODUCT_DONOTSEARCH_ANYWHERE да бъде със стойност "1" в Настройки - Други настройки. След това търсенето ще бъде ограничено до началото на низ.
|
||||
UseSearchToSelectProduct=Изчакване, докато бъде натиснат клавиш преди да се зареди съдържанието на комбинирания списък с продукти (това може да увеличи производителността, ако имате голям брой продукти, но е по-малко удобно)
|
||||
SetDefaultBarcodeTypeProducts=Тип баркод по подразбиране, който да се използва за продукти
|
||||
|
||||
@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Разходния отчет е валидира
|
||||
Notify_EXPENSE_REPORT_APPROVE=Разходният отчет е одобрен
|
||||
Notify_HOLIDAY_VALIDATE=Молбата за отпуск е валидирана (изисква се одобрение)
|
||||
Notify_HOLIDAY_APPROVE=Молбата за отпуск е одобрена
|
||||
Notify_ACTION_CREATE=Added action to Agenda
|
||||
SeeModuleSetup=Вижте настройка на модул %s
|
||||
NbOfAttachedFiles=Брой на прикачените файлове / документи
|
||||
TotalSizeOfAttachedFiles=Общ размер на прикачените файлове / документи
|
||||
@ -215,6 +216,7 @@ EMailTextExpenseReportValidated=Разходен отчет %s е валидир
|
||||
EMailTextExpenseReportApproved=Разходен отчет %s е одобрен.
|
||||
EMailTextHolidayValidated=Молба за отпуск %s е валидирана.
|
||||
EMailTextHolidayApproved=Молба за отпуск %s е одобрена.
|
||||
EMailTextActionAdded=The action %s has been added to the Agenda.
|
||||
ImportedWithSet=Набор от данни за импортиране
|
||||
DolibarrNotification=Автоматично известяване
|
||||
ResizeDesc=Въведете нова ширина <b>или</b> нова височина. Съотношението ще се запази по време преоразмеряването...
|
||||
|
||||
@ -108,7 +108,7 @@ FillWithLastServiceDates=Fill with last service line dates
|
||||
MultiPricesAbility=Множество ценови сегменти за продукт / услуга (всеки клиент е в един ценови сегмент)
|
||||
MultiPricesNumPrices=Брой цени
|
||||
DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices
|
||||
AssociatedProductsAbility=Enable Kits (set of other products)
|
||||
AssociatedProductsAbility=Enable Kits (set of several products)
|
||||
VariantsAbility=Enable Variants (variations of products, for example color, size)
|
||||
AssociatedProducts=Kits
|
||||
AssociatedProductsNumber=Number of products composing this kit
|
||||
|
||||
@ -76,15 +76,16 @@ MyActivities=Мои задачи / дейности
|
||||
MyProjects=Мои проекти
|
||||
MyProjectsArea=Секция с мои проекти
|
||||
DurationEffective=Ефективна продължителност
|
||||
ProgressDeclared=Деклариран напредък
|
||||
ProgressDeclared=Declared real progress
|
||||
TaskProgressSummary=Напредък на задачата
|
||||
CurentlyOpenedTasks=Текущи активни задачи
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=Декларираният напредък е по-малко %s от изчисления напредък
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Декларираният напредък е повече %s от изчисления напредък
|
||||
ProgressCalculated=Изчислен напредък
|
||||
TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption
|
||||
TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption
|
||||
ProgressCalculated=Progress on consumption
|
||||
WhichIamLinkedTo=с които съм свързан
|
||||
WhichIamLinkedToProject=с които съм свързан в проект
|
||||
Time=Време
|
||||
TimeConsumed=Consumed
|
||||
ListOfTasks=Списък със задачи
|
||||
GoToListOfTimeConsumed=Показване на списъка с изразходвано време
|
||||
GanttView=Gantt диаграма
|
||||
|
||||
@ -1598,8 +1598,13 @@ ServiceSetup=Services module setup
|
||||
ProductServiceSetup=Products and Services modules setup
|
||||
NumberOfProductShowInSelect=Maximum number of products to show in combo select lists (0=no limit)
|
||||
ViewProductDescInFormAbility=Display product descriptions in forms (otherwise shown in a tooltip popup)
|
||||
DoNotAddProductDescAtAddLines=Do not add product description (from product card) on submit add lines on forms
|
||||
OnProductSelectAddProductDesc=How to use the description of the products when adding a product as a line of a document
|
||||
AutoFillFormFieldBeforeSubmit=Auto fill the description input field with the description of product
|
||||
DoNotAutofillButAutoConcat=Do not autofill the input field with description of product. Description of the product will be concatenated to the entered description automatically.
|
||||
DoNotUseDescriptionOfProdut=Description of the product will never be included into the description of lines of documents
|
||||
MergePropalProductCard=Activate in product/service Attached Files tab an option to merge product PDF document to proposal PDF azur if product/service is in the proposal
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in the language of the third party
|
||||
ViewProductDescInThirdpartyLanguageAbility=Display products descriptions in forms in the language of the third party (otherwise in the language of the user)
|
||||
UseSearchToSelectProductTooltip=Also if you have a large number of products (> 100 000), you can increase speed by setting constant PRODUCT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string.
|
||||
UseSearchToSelectProduct=Wait until you press a key before loading content of product combo list (This may increase performance if you have a large number of products, but it is less convenient)
|
||||
SetDefaultBarcodeTypeProducts=Default barcode type to use for products
|
||||
|
||||
@ -78,6 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required)
|
||||
Notify_EXPENSE_REPORT_APPROVE=Expense report approved
|
||||
Notify_HOLIDAY_VALIDATE=Leave request validated (approval required)
|
||||
Notify_HOLIDAY_APPROVE=Leave request approved
|
||||
Notify_ACTION_CREATE=Added action to Agenda
|
||||
SeeModuleSetup=See setup of module %s
|
||||
NbOfAttachedFiles=Number of attached files/documents
|
||||
TotalSizeOfAttachedFiles=Total size of attached files/documents
|
||||
@ -215,6 +216,7 @@ EMailTextExpenseReportValidated=Expense report %s has been validated.
|
||||
EMailTextExpenseReportApproved=Expense report %s has been approved.
|
||||
EMailTextHolidayValidated=Leave request %s has been validated.
|
||||
EMailTextHolidayApproved=Leave request %s has been approved.
|
||||
EMailTextActionAdded=The action %s has been added to the Agenda.
|
||||
ImportedWithSet=Importation data set
|
||||
DolibarrNotification=Automatic notification
|
||||
ResizeDesc=Enter new width <b>OR</b> new height. Ratio will be kept during resizing...
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user