Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
c8a1ac578d
89 changed files with 918 additions and 659 deletions
11
ChangeLog
11
ChangeLog
|
|
@ -45,6 +45,10 @@ NEW: Accountancy - Add possibility for specific format FEC to sort with the FEC
|
|||
NEW: Accountancy - Expense report - Add an option to use end period for transfer (#26706)
|
||||
NEW: Accountancy - Show accounting result on balance
|
||||
NEW: Accountancy - Show import key if exist (#29265)
|
||||
NEW: Accountancy - Auto-determine piece number in FEC import (#29672)
|
||||
NEW: Accountancy - Option to transfer only reconciled lines from bank (#29408)
|
||||
NEW: Accountancy - Separation of accounting default account for salary and expense report
|
||||
NEW: Various payment - Use list of accounting account when edit (#27992)
|
||||
NEW: Add option to change all service dates at once
|
||||
NEW: Add a default limit in nb to agenda export
|
||||
NEW: Add a Feedback-ID into email headers
|
||||
|
|
@ -97,7 +101,6 @@ NEW: Allow smileys into emailing html content
|
|||
NEW: Allow to set a default project for POS sales (#27042)
|
||||
NEW: animation for display spinner when waiting response
|
||||
NEW: Asset Module - make asset model creation in a single step (#26982)
|
||||
NEW: auto-determine piece number in FEC import (#29672)
|
||||
NEW: auto fill infos in template email
|
||||
NEW: Automatically fill matching extra fields of object on line creation. (#27240)
|
||||
NEW: Can add documents on a payment (#29660)
|
||||
|
|
@ -134,7 +137,7 @@ NEW: fetch object by element for website account card
|
|||
NEW: filter on sale representative in contact list
|
||||
NEW: Filter shipments by selecting multiple shipping methods (#28376)
|
||||
NEW: Font param Look and Feel (#29302)
|
||||
NEW: fuctionnality for stock configuration prompt in AI module (#28030)
|
||||
NEW: functionality for stock configuration prompt in AI module (#28030)
|
||||
NEW: functionality to delete contact of company list
|
||||
NEW: functionality to display codebar on pdf files (#29623)
|
||||
NEW: functionality to list event for user
|
||||
|
|
@ -166,7 +169,6 @@ NEW: notification action triggers for cancelling orders and invoices
|
|||
NEW: now button when editing an event
|
||||
NEW: online signature of shipments (#29559)
|
||||
NEW: On OAuth Google login, no prompt at all if already logged in Google
|
||||
NEW: Option to transfer only reconciliated lines from bank (#29408)
|
||||
NEW: Param to show main menu logo in color look and feel (#29305)
|
||||
NEW: Payment page received from donations
|
||||
NEW: possibility to define a completely inactive module (#29289)
|
||||
|
|
@ -179,7 +181,6 @@ NEW: resource address, phone, email & maxusers (#28185)
|
|||
NEW: Script for fast identification of missing/unused/duplicate translations
|
||||
NEW: search member by date
|
||||
NEW: See the documents of my subordinates (#28318)
|
||||
NEW: separation of expense report from salary accounting code
|
||||
NEW: Show error on ical parse
|
||||
NEW: Show the profit per attendee on events
|
||||
NEW: signed status CRUD to contract and fichinter
|
||||
|
|
@ -206,7 +207,6 @@ NEW: Update expense report card.php to allow pdf preview even without thumbnail
|
|||
NEW: update price with auto to use const for rounding prices (#29350)
|
||||
NEW: Use a nicer combo list to select the export accounting format
|
||||
NEW: users can set their own length for short lists
|
||||
NEW: Various payment - Use list of account when edit (#27992)
|
||||
NEW: warning message when cloning a product whose status is not to sell (#28374)
|
||||
PERF: Performance enhancement on Invoice/Paiement area page
|
||||
PERF: Use cache for loaded users/contact on project list
|
||||
|
|
@ -219,6 +219,7 @@ SEC: Reduce nb of var without WAF used when using the website module
|
|||
|
||||
For developers or integrators:
|
||||
------------------------------
|
||||
NEW: Situation invoice - Add new official progressive mode - (constant INVOICE_USE_SITUATION = 2)
|
||||
NEW: $noescapetags param of dol_escape_html works if attributes
|
||||
NEW: Add createInvoiceFromContract to API invoice (#27277)
|
||||
NEW: add debugging info to api/status if non-production
|
||||
|
|
|
|||
|
|
@ -42,6 +42,32 @@ const PREFIXES = [
|
|||
'php' => ['/* ', ' * ', ' */', '<?php'],
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* Expand tabs in string to spaces.
|
||||
*
|
||||
* @param $str String in which to expand the tabs to spaces
|
||||
* @param $tabWidth Width to use for a tabstop
|
||||
*
|
||||
* @return string Expanded string value.
|
||||
*/
|
||||
function expandTabs($str, $tabWidth)
|
||||
{
|
||||
$expanded = '';
|
||||
$col = 0;
|
||||
$len = mb_strlen($str);
|
||||
for ($i = 0; $i < $len; $i++) {
|
||||
if ($str[$i] == "\t") {
|
||||
$expanded .= str_repeat(' ', $tabWidth - ($col % $tabWidth));
|
||||
$col += $tabWidth - ($col % $tabWidth);
|
||||
} else {
|
||||
$expanded .= $str[$i];
|
||||
$col++;
|
||||
}
|
||||
}
|
||||
return $expanded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update or add copyright notice in a file
|
||||
*
|
||||
|
|
@ -70,9 +96,31 @@ function updateCopyrightNotice($filename, $fileType, $name, $email)
|
|||
$n = 50;
|
||||
$lines = implode('', array_slice(file($filename), 0, $n));
|
||||
|
||||
// Define the regex pattern for matching copyright notices
|
||||
$pattern = "~(?:{$r_prefix0}|{$r_prefix1})Copyright \(C\)\s+(?:(?:\d{4}-)?(?<year>\d{4}))\s+{$r_name}\s*\<{$r_email}>~";
|
||||
// Based on the tendency to limit the length of the spacing between the name
|
||||
// and email to the smallest one, determine the biggest offset from the start
|
||||
// of a name to the start of the email, and use that for the current name/email
|
||||
// offset if it is sufficient.
|
||||
|
||||
// Pattern to match any copyright already present
|
||||
$allpattern = "~(?:{$r_prefix0}|{$r_prefix1})Copyright \(C\)\s+(?:(?:\d{4}-)?(?:\d{4}))\s+(\S.*)<\S+>~";
|
||||
// Set minimum offset based of width of new name
|
||||
$nameStartToMailStartOffset = 4 * (int) ((mb_strlen($r_name) + 4) / 4);
|
||||
|
||||
if (preg_match_all($allpattern, $lines, $allmatches)) {
|
||||
foreach ($allmatches[1] as $nameAndSpaces) {
|
||||
//print $nameAndSpaces."\n";
|
||||
$nameAndSpaces = expandTabs($nameAndSpaces, 4);
|
||||
$currentOffset = mb_strlen($nameAndSpaces);
|
||||
$currentOffset = 4 * (int) ((3 + $currentOffset) / 4);
|
||||
//print "Other offset $nameAndSpaces: $currentOffset\n";
|
||||
if ($currentOffset > $nameStartToMailStartOffset) {
|
||||
$nameStartToMailStartOffset = $currentOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pattern to match the line matching the current developer
|
||||
$pattern = "~(?:{$r_prefix0}|{$r_prefix1})Copyright \(C\)\s+(?:(?:\d{4}-)?(?<year>\d{4}))\s+{$r_name}\s*\<{$r_email}>~";
|
||||
// Check if the lines match the pattern
|
||||
$matches = array();
|
||||
if (preg_match($pattern, $lines, $matches)) {
|
||||
|
|
@ -90,7 +138,8 @@ function updateCopyrightNotice($filename, $fileType, $name, $email)
|
|||
// If the existing year is the same, no need to update
|
||||
} else {
|
||||
// Adjust tabs for proper alignment
|
||||
$emailTabs = str_repeat("\t", (int) (max(0, (31 - mb_strlen($name)) / 4)));
|
||||
print "Offset:".$nameStartToMailStartOffset."\n";
|
||||
$emailTabs = str_repeat("\t", (int) (max(0, ($nameStartToMailStartOffset + 4 - mb_strlen($name)) / 4)));
|
||||
|
||||
// No match found, add a new line to the header
|
||||
$newNotice = "Copyright (C) " . date('Y') . "\t\t" . $name . $emailTabs . "<" . $email . ">";
|
||||
|
|
@ -113,7 +162,8 @@ function updateCopyrightNotice($filename, $fileType, $name, $email)
|
|||
}
|
||||
|
||||
// Write the updated content back to the file
|
||||
file_put_contents($filename, $fileContent);
|
||||
//file_put_contents($filename, $fileContent);
|
||||
print $fileContent;
|
||||
return true; // Change detected
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
return [
|
||||
// # Issue statistics:
|
||||
// PhanPluginUnknownPropertyType : 1550+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 920+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 890+ occurrences
|
||||
// PhanUndeclaredProperty : 840+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 750+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 480+ occurrences
|
||||
|
|
@ -55,7 +55,6 @@ return [
|
|||
'htdocs/admin/dict.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/admin/mails_templates.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/admin/security_file.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -96,11 +95,10 @@ return [
|
|||
'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookmarks/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookmarks/class/bookmark.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/edit.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/edit.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/index.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/info.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/photos.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -196,8 +194,8 @@ return [
|
|||
'htdocs/compta/paiement/class/cpaiement.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/paiement/class/paiement.class.php' => ['PhanEmptyForeach', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/payment_vat/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/prelevement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/prelevement/class/bonprelevement.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'],
|
||||
|
|
@ -535,7 +533,7 @@ return [
|
|||
'htdocs/core/tpl/advtarget.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/bloc_comment.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/card_presend.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/card_presend.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/commonfields_add.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/tpl/commonfields_edit.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/commonfields_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -568,7 +566,7 @@ return [
|
|||
'htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp'],
|
||||
'htdocs/cron/class/cronjob.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/datapolicy/class/datapolicy.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -644,7 +642,7 @@ return [
|
|||
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/tpl/expensereport_addfile.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/tpl/expensereport_linktofile.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -680,7 +678,7 @@ return [
|
|||
'htdocs/fourn/facture/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/fourn/facture/list-rec.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/facture/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/facture/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/paiement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/paiement/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -794,7 +792,7 @@ return [
|
|||
'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/canvas/service/actions_card_service.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
|
|
@ -832,7 +830,7 @@ return [
|
|||
'htdocs/product/stock/class/productstockentrepot.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/massstockmove.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/massstockmove.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/product.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -1072,7 +1070,6 @@ return [
|
|||
'htdocs/webservices/server_contact.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_order.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_other.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_payment.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_productorservice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_project.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ BAN
|
|||
BI
|
||||
BOMs
|
||||
Back
|
||||
Bad value for email, email lwas not verified by Google
|
||||
Bad value for email, email was not verified by Google
|
||||
Bad value for returned userinfo[aud]
|
||||
Bad value for returned userinfo[exp]. Token expired.
|
||||
Bad value for returned userinfo[iss]
|
||||
|
|
@ -302,8 +302,6 @@ ECMAreaDesc2
|
|||
ECMDocsByProducts
|
||||
ECMSectionAutoDesc
|
||||
ECMSectionManualDesc
|
||||
EMail
|
||||
EMails
|
||||
EcmFiles
|
||||
EditAdherent
|
||||
EditAdherentAddress
|
||||
|
|
|
|||
|
|
@ -374,6 +374,20 @@ if ($result) {
|
|||
}
|
||||
|
||||
// After the loop on each line
|
||||
$parameters = array(
|
||||
'tabfac' => &$tabfac,
|
||||
'tabht' => &$tabht,
|
||||
'tabtva' => &$tabtva,
|
||||
'def_tva' => &$def_tva,
|
||||
'tabwarranty' => &$tabwarranty,
|
||||
'tabrevenuestamp' => &$tabrevenuestamp,
|
||||
'tabttc' => &$tabttc,
|
||||
'tablocaltax1' => &$tablocaltax1,
|
||||
'tablocaltax2' => &$tablocaltax2,
|
||||
'tabcompany' => &$tabcompany,
|
||||
'vatdata_cache' => &$vatdata_cache,
|
||||
);
|
||||
$reshook = $hookmanager->executeHooks('processedJournalData', $parameters); // Note that $action and $object may have been modified by hook
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@ if ($action == 'updateMask') {
|
|||
$module = new $classname($db);
|
||||
'@phan-var-force ModelePDFContract $module';
|
||||
|
||||
/** @var ModelePDFContract $module */
|
||||
if ($module->write_file($contract, $langs) > 0) {
|
||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=contract&file=SPECIMEN.pdf");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -41,7 +42,6 @@ if (!$user->admin) {
|
|||
}
|
||||
|
||||
|
||||
$type = array('yesno', 'texte', 'chaine');
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$testsubscribeemail = GETPOST("testsubscribeemail");
|
||||
|
|
@ -57,13 +57,14 @@ $error = 0;
|
|||
// Action updated or added a constant
|
||||
if ($action == 'update' || $action == 'add') {
|
||||
$tmparray = GETPOST('constname', 'array');
|
||||
$tmpvalue = GETPOST('constvalue', 'array');
|
||||
$tmpnote = GETPOST('constnote', 'array');
|
||||
if (is_array($tmparray)) {
|
||||
foreach ($tmparray as $key => $val) {
|
||||
$constname = $tmparray[$key];
|
||||
$constvalue = $tmparray[$key];
|
||||
$consttype = $tmparray[$key];
|
||||
$constnote = $tmparray[$key];
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
$constvalue = $tmpvalue[$key];
|
||||
$constnote = $tmpnote[$key];
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, $constnote, $conf->entity);
|
||||
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ print '</form>';
|
|||
// Form to test upload
|
||||
print '<br>';
|
||||
$formfile = new FormFile($db);
|
||||
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, '', '', 1, '', 0);
|
||||
$formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, null, '', 1, '', 0);
|
||||
|
||||
// List of document
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '', $sortfield, $sortorder == 'desc' ? SORT_DESC : SORT_ASC, 1);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -42,8 +43,6 @@ if (!$user->admin) {
|
|||
}
|
||||
|
||||
|
||||
$type = array('yesno', 'texte', 'chaine');
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
|
||||
|
|
@ -55,7 +54,6 @@ $action = GETPOST('action', 'aZ09');
|
|||
if ($action == 'update' || $action == 'add') {
|
||||
$constnamearray = GETPOST("constname", 'array');
|
||||
$constvaluearray = GETPOST("constvalue", 'array');
|
||||
$consttypearray = GETPOST("consttype", 'array');
|
||||
$constnotearray = GETPOST("constnote", 'array');
|
||||
|
||||
// Action mise a jour ou ajout d'une constante
|
||||
|
|
@ -63,10 +61,9 @@ if ($action == 'update' || $action == 'add') {
|
|||
foreach ($constnamearray as $key => $val) {
|
||||
$constname = dol_escape_htmltag($constnamearray[$key]);
|
||||
$constvalue = dol_escape_htmltag($constvaluearray[$key]);
|
||||
$consttype = (int) $consttypearray[$key];
|
||||
$constnote = dol_escape_htmltag($constnotearray[$key]);
|
||||
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, $type[$consttype], 0, $constnote, $conf->entity);
|
||||
$res = dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, $constnote, $conf->entity);
|
||||
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@ if (getDolGlobalInt('MAIN_ACTIVATE_FILECACHE')) {
|
|||
} else {
|
||||
print img_picto('', 'minus', 'class="pictofixedwidth"');
|
||||
}
|
||||
print ' '.$form->textwithpicto($langs->trans("EnableFileCache").' ('.$langs->trans("Widgets").')', $langs->trans("Option").' MAIN_ACTIVATE_FILECACHE');
|
||||
print $form->textwithpicto($langs->trans("EnableFileCache").' ('.$langs->trans("Widgets").')', $langs->trans("Option").' MAIN_ACTIVATE_FILECACHE');
|
||||
print ': '.yn(getDolGlobalInt('MAIN_ACTIVATE_FILECACHE'));
|
||||
print '<br>';
|
||||
|
||||
|
|
@ -669,7 +669,7 @@ if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
|||
} else {
|
||||
print img_picto('', 'minus', 'class="pictofixedwidth"');
|
||||
}
|
||||
print ' MAIN_ENABLE_AJAX_TOOLTIP : ';
|
||||
print 'MAIN_ENABLE_AJAX_TOOLTIP : ';
|
||||
print yn(getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP'));
|
||||
print '<br>';
|
||||
|
||||
|
|
|
|||
|
|
@ -379,11 +379,12 @@ if (empty($dolibarr_main_stream_to_disable)) {
|
|||
} else {
|
||||
print implode(', ', $dolibarr_main_stream_to_disable);
|
||||
}
|
||||
print '<span class="bold"> -> Current PHP streams allowed = </span>';
|
||||
print '<span class="bold"> -> Current PHP streams allowed = </span>';
|
||||
$arrayofstreams = stream_get_wrappers();
|
||||
if (!empty($arrayofstreams)) {
|
||||
sort($arrayofstreams);
|
||||
print(implode(', ', $arrayofstreams)).' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("TryToKeepOnly", 'file,http,https,php,zip').')</span>'."\n";
|
||||
print '<span class="wordbreakall">'.implode(',', $arrayofstreams).'</span>';
|
||||
print ' <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("TryToKeepOnly", 'file,http,https,php,zip').')</span>'."\n";
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -167,21 +167,12 @@ if ($action == 'updateMask') {
|
|||
$error++;
|
||||
}
|
||||
|
||||
if (GETPOSTISSET('product_category_id')) {
|
||||
$param_ticket_product_category = GETPOSTINT('product_category_id');
|
||||
$res = dolibarr_set_const($db, 'TICKET_PRODUCT_CATEGORY', $param_ticket_product_category, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
$param_status = GETPOST('TICKET_SET_STATUS_ON_ANSWER');
|
||||
$res = dolibarr_set_const($db, 'TICKET_SET_STATUS_ON_ANSWER', $param_status, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
||||
$param_delay_first_response = GETPOSTINT('delay_first_response');
|
||||
$res = dolibarr_set_const($db, 'TICKET_DELAY_BEFORE_FIRST_RESPONSE', $param_delay_first_response, 'chaine', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
|
|
@ -625,37 +616,6 @@ print $formcategory->textwithpicto('', $langs->trans("TicketAutoCheckNotifyThird
|
|||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Assign contact to a message
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAssignContactToMessage").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_ASSIGN_CONTACT_TO_MESSAGE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_ASSIGN_CONTACT_TO_MESSAGE", $arrval, getDolGlobalString('TICKET_ASSIGN_CONTACT_TO_MESSAGE'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketAssignContactToMessageHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
if (isModEnabled('product')) {
|
||||
$htmlname = "product_category_id";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketChooseProductCategory").'</td>';
|
||||
print '<td class="left">';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
$formcategory->selectProductCategory(getDolGlobalString('TICKET_PRODUCT_CATEGORY'), $htmlname);
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_combobox('select_'.$htmlname);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketChooseProductCategoryHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TicketsDelayBeforeFirstAnswer")."</td>";
|
||||
print '<td class="left">
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ require '../main.inc.php';
|
|||
require_once DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/lib/ticket.lib.php";
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/html.formcategory.class.php";
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin", "ticket"));
|
||||
|
|
@ -221,6 +222,7 @@ if ($action != '') {
|
|||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcategory = new FormCategory($db);
|
||||
|
||||
$help_url = "FR:Module_Ticket";
|
||||
$page_name = "TicketSetup";
|
||||
|
|
@ -414,7 +416,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
}
|
||||
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
print '<tr class="impair"><td colspan="3" align="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></td>';
|
||||
print '<tr><td colspan="3" align="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
|
@ -458,9 +460,29 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHelpMessageHelpAdmin"), 1, 'help');
|
||||
print '</td></tr>';
|
||||
|
||||
// Add first contact id found in database from submitter email entered into public interface
|
||||
// Feature disabled: This has a security trouble. The public interface is a no login interface, so being able to show the contact info from an
|
||||
// email decided by the submiter allows anybody to get information on any contact (customer or supplier) in Dolibarr database.
|
||||
// He can even check if contact exists by trying any email if this feature is enabled.
|
||||
/*
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketAssignContactToMessage").'</td>';
|
||||
print '<td class="left">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('TICKET_ASSIGN_CONTACT_TO_MESSAGE');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $formcategory->selectarray("TICKET_ASSIGN_CONTACT_TO_MESSAGE", $arrval, getDolGlobalString('TICKET_ASSIGN_CONTACT_TO_MESSAGE'));
|
||||
}
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $formcategory->textwithpicto('', $langs->trans("TicketAssignContactToMessageHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Url public interface
|
||||
$url_interface = getDolGlobalString("TICKET_URL_PUBLIC_INTERFACE");
|
||||
print '<tr><td>'.$langs->trans("UrlPublicInterfaceLabelAdmin").'</label>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("UrlPublicInterfaceLabelAdmin").'</label>';
|
||||
print '</td><td>';
|
||||
print '<input type="text" class="minwidth500" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$url_interface.'" placeholder="https://..."></td>';
|
||||
print '</td>';
|
||||
|
|
@ -470,15 +492,17 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
print load_fiche_titre($langs->trans("Emails"));
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
|
||||
// Activate email creation to user
|
||||
print '<tr class="pair"><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketsDisableCustomerEmail"), $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
|
|
@ -493,7 +517,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
|
||||
// Text of email after creatio of a ticket
|
||||
$mail_mesg_new = getDolGlobalString("TICKET_MESSAGE_MAIL_NEW", $langs->trans('TicketNewEmailBody'));
|
||||
print '<tr><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketNewEmailBodyLabel"), $langs->trans("TicketNewEmailBodyHelp"), 1, 'help');
|
||||
print '</label>';
|
||||
print '</td><td>';
|
||||
|
|
@ -504,7 +528,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print '</tr>';
|
||||
|
||||
// Activate email notification when a new message is added
|
||||
print '<tr class="pair"><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketsPublicNotificationNewMessage"), $langs->trans("TicketsPublicNotificationNewMessageHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '<td class="left">';
|
||||
|
|
@ -518,7 +542,7 @@ if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) {
|
|||
print '</tr>';
|
||||
|
||||
// Send notification when a new message is added to a email if a user is not assigned to the ticket
|
||||
print '<tr><td>';
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketPublicNotificationNewMessageDefaultEmail"), $langs->trans("TicketPublicNotificationNewMessageDefaultEmailHelp"), 1, 'help');
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL" value="'.getDolGlobalString("TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL").'" size="40" ></td>';
|
||||
|
|
|
|||
|
|
@ -234,6 +234,12 @@ $workflowcodes = array_filter(
|
|||
}
|
||||
);
|
||||
|
||||
if ($action == 'setvarworkflow') { // Test on permission already done
|
||||
if (GETPOSTISSET('product_category_id')) {
|
||||
$param_ticket_product_category = GETPOSTINT('product_category_id');
|
||||
$res = dolibarr_set_const($db, 'TICKET_PRODUCT_CATEGORY', $param_ticket_product_category, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -261,22 +267,30 @@ if (count($workflowcodes) < 1) {
|
|||
// Sort on position
|
||||
$workflowcodes = dol_sort_array($workflowcodes, 'position');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'" enctype="multipart/form-data" >';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setvarworkflow">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
|
||||
$oldfamily = '';
|
||||
$tableopen = 0;
|
||||
$atleastoneline = 0;
|
||||
|
||||
foreach ($workflowcodes as $key => $params) {
|
||||
if ($params['family'] == 'separator') {
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
if ($atleastoneline) {
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
$oldfamily = '';
|
||||
$atleastoneline = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$reg = array();
|
||||
if ($oldfamily != $params['family']) {
|
||||
// New group
|
||||
if ($params['family'] == 'create') {
|
||||
$header = $langs->trans("AutomaticCreation");
|
||||
} elseif (preg_match('/classify_(.*)/', $params['family'], $reg)) {
|
||||
|
|
@ -308,6 +322,9 @@ foreach ($workflowcodes as $key => $params) {
|
|||
$header = $langs->trans("Description");
|
||||
}
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
$tableopen = 1;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>'.$header.'</th>';
|
||||
print '<th class="right">'.$langs->trans("Status").'</th>';
|
||||
|
|
@ -316,6 +333,8 @@ foreach ($workflowcodes as $key => $params) {
|
|||
$oldfamily = $params['family'];
|
||||
}
|
||||
|
||||
$atleastoneline = 1;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print img_object('', $params['picto'], 'class="pictofixedwidth"');
|
||||
|
|
@ -328,6 +347,26 @@ foreach ($workflowcodes as $key => $params) {
|
|||
print ' '.img_warning($langs->transnoentitiesnoconv("Deprecated"));
|
||||
}
|
||||
|
||||
if ($key == 'WORKFLOW_TICKET_LINK_CONTRACT' && getDolGlobalString('WORKFLOW_TICKET_LINK_CONTRACT')) {
|
||||
require_once DOL_DOCUMENT_ROOT."/core/class/html.formcategory.class.php";
|
||||
|
||||
$formcategory = new FormCategory($db);
|
||||
|
||||
$htmlname = "product_category_id";
|
||||
print '<br>';
|
||||
print $formcategory->textwithpicto($langs->trans("TicketChooseProductCategory"), $langs->trans("TicketChooseProductCategoryHelp"), 1, 'help');
|
||||
if (isModEnabled('category')) {
|
||||
print ' '.img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
$formcategory->selectProductCategory(getDolGlobalInt('TICKET_PRODUCT_CATEGORY'), $htmlname, 1);
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_combobox('select_'.$htmlname);
|
||||
}
|
||||
print '<input class="button smallpaddingimp" type="submit" value="'.$langs->trans("Save").'">';
|
||||
} else {
|
||||
print 'Module category must be enabled';
|
||||
}
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
|
|
@ -354,7 +393,12 @@ foreach ($workflowcodes as $key => $params) {
|
|||
print '</tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
if ($tableopen) {
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
|
|
|||
|
|
@ -331,6 +331,8 @@ if (empty($reshook) && $action == 'add' && $usercancreate) {
|
|||
$datep = dol_mktime(GETPOSTINT("aphour"), GETPOSTINT("apmin"), GETPOSTINT("apsec"), GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel');
|
||||
$datef = dol_mktime(GETPOSTINT("p2hour"), GETPOSTINT("p2min"), GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel');
|
||||
}
|
||||
//set end date to now if percentage is set to 100 and end date not set
|
||||
$datef = (!$datef && $percentage == 100)?dol_now():$datef;
|
||||
|
||||
// Check parameters
|
||||
if (!$datef && $percentage == 100) {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ if (!empty($user->socid)) {
|
|||
$hookmanager->initHooks(array('proposalcontactcard', 'globalcard'));
|
||||
$result = restrictedArea($user, 'propal', $object->id);
|
||||
|
||||
restrictedArea($user, 'propal', $object->id);
|
||||
|
||||
$usercancreate = $user->hasRight("propal", "creer");
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ $socid = '';
|
|||
if (!empty($user->socid)) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$hookmanager->initHooks(array('propaldocument', 'globalcard'));
|
||||
restrictedArea($user, 'propal', $object->id);
|
||||
|
||||
$usercancreate = $user->hasRight("propal", "creer");
|
||||
|
|
|
|||
|
|
@ -746,6 +746,11 @@ class Account extends CommonObject
|
|||
$this->status = $this->clos;
|
||||
}
|
||||
|
||||
if (empty($this->address && !empty($this->domiciliation))) {
|
||||
dol_syslog(get_class($this)."::create domiciliation is deprecated use address", LOG_NOTICE);
|
||||
$this->address = $this->domiciliation;
|
||||
}
|
||||
|
||||
// Load the library to validate/check a BAN account
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
|
||||
|
|
|
|||
|
|
@ -1523,7 +1523,7 @@ class Invoices extends DolibarrApi
|
|||
|
||||
// Creation of payment line
|
||||
$paymentobj = new Paiement($this->db);
|
||||
$paymentobj->datepaye = dol_stringtotime($datepaye);
|
||||
$paymentobj->datepaye = $datepaye;
|
||||
$paymentobj->amounts = $amounts; // Array with all payments dispatching with invoice id
|
||||
$paymentobj->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching
|
||||
$paymentobj->paiementid = $paymentid;
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ $permissiontoadd = $user->hasRight('facture', 'creer');
|
|||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
$hookmanager->initHooks(array('invoicedocument', 'globalcard'));
|
||||
$result = restrictedArea($user, 'facture', $object->id, '');
|
||||
|
||||
$usercancreate = $user->hasRight("facture", "creer");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2011-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2011-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -484,7 +485,7 @@ if ($action == 'encrypt') {
|
|||
if ($resupdate) {
|
||||
$nbupdatedone++;
|
||||
} else {
|
||||
setEventMessages($db->lasterror(), '', 'errors');
|
||||
setEventMessages($db->lasterror(), null, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -111,7 +112,7 @@ if (GETPOST('sendit', 'alpha') && getDolGlobalString('MAIN_UPLOAD_DOC') && !empt
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
dol_add_file_process($upload_dir, 0, 1, 'userfile', null, $link, '', 0);
|
||||
dol_add_file_process($upload_dir, 0, 1, 'userfile', '', $link, '', 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1763,7 +1763,7 @@ if (!$error && ($massaction == 'increaseholiday' || ($action == 'increaseholiday
|
|||
$nbdaysholidays = GETPOSTFLOAT('nbdaysholidays'); // May be 1.5
|
||||
|
||||
if ($nbdaysholidays <= 0) {
|
||||
setEventMessages($langs->trans("WrongAmount"), "", 'errors');
|
||||
setEventMessages($langs->trans("WrongAmount"), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
|
|
@ -1869,7 +1869,7 @@ if (!$error && ($massaction == 'clonetasks' || ($action == 'clonetasks' && $conf
|
|||
} else {
|
||||
if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||
$langs->load("projects");
|
||||
setEventMessages($langs->trans('NewTaskRefSuggested'), '', 'warnings');
|
||||
setEventMessages($langs->trans('NewTaskRefSuggested'), null, 'warnings');
|
||||
$duplicate_code_error = true;
|
||||
} else {
|
||||
setEventMessages($clone_task->error, $clone_task->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class ExtraFields
|
|||
public $db;
|
||||
|
||||
/**
|
||||
* @var array<string,array{label:array<string,string>,type:array<string,string>,size:array<string,string>,default:array<string,string>,computed:array<string,string>,unique:array<string,int>,required:array<string,int>,param:array<string,mixed>,perms:array<string,mixed[]>,list:array<string,int|string>,pos:array<string,int>,totalizable:array<string,int>,help:array<string,string>,printable:array<string,int>,enabled:array<string,int>,langfile:array<string,string>,css:array<string,string>,csslist:array<string,string>,cssview:array<string,string>,hidden:array<string,int>,mandatoryfieldsofotherentities:array<string,string>,loaded?:int,count:int}> New array to store extrafields definition Note: count set as present to avoid static analysis notices
|
||||
* @var array<string,array{label:array<string,string>,type:array<string,string>,size:array<string,string>,default:array<string,string>,computed:array<string,string>,unique:array<string,int>,required:array<string,int>,param:array<string,mixed>,perms:array<string,mixed>,list:array<string,int|string>,pos:array<string,int>,totalizable:array<string,int>,help:array<string,string>,printable:array<string,int>,enabled:array<string,int>,langfile:array<string,string>,css:array<string,string>,csslist:array<string,string>,cssview:array<string,string>,hidden:array<string,int>,mandatoryfieldsofotherentities:array<string,string>,loaded?:int,count:int}> New array to store extrafields definition Note: count set as present to avoid static analysis notices
|
||||
*/
|
||||
public $attributes = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -2684,7 +2684,7 @@ class Form
|
|||
if ((int) $warehouseId > 0) {
|
||||
$urloption .= '&warehouseid=' . (int) $warehouseId;
|
||||
}
|
||||
$out .= ajax_autocompleter((string) $selected, $htmlname, DOL_URL_ROOT . '/product/ajax/products.php', $urloption, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT, 1, $ajaxoptions);
|
||||
$out .= ajax_autocompleter((string) $selected, $htmlname, DOL_URL_ROOT . '/product/ajax/products.php', $urloption, getDolGlobalInt('PRODUIT_USE_SEARCH_TO_SELECT'), getDolGlobalInt('PRODUCT_SEARCH_AUTO_SELECT_IF_ONLY_ONE', 1), $ajaxoptions);
|
||||
|
||||
if (isModEnabled('variants') && is_array($selected_combinations)) {
|
||||
// Code to automatically insert with javascript the select of attributes under the select of product
|
||||
|
|
@ -3712,9 +3712,7 @@ class Form
|
|||
|
||||
$sql = "SELECT p.rowid, p.ref, p.label, p.price, p.duration, p.fk_product_type, p.stock, p.tva_tx as tva_tx_sale, p.default_vat_code as default_vat_code_sale,";
|
||||
$sql .= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.remise_percent, pfp.remise, pfp.unitprice, pfp.barcode";
|
||||
if (isModEnabled('multicurrency')) {
|
||||
$sql .= ", pfp.multicurrency_code, pfp.multicurrency_unitprice";
|
||||
}
|
||||
$sql .= ", pfp.multicurrency_code, pfp.multicurrency_unitprice";
|
||||
$sql .= ", pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, pfp.default_vat_code, pfp.fk_soc, s.nom as name";
|
||||
$sql .= ", pfp.supplier_reputation";
|
||||
// if we use supplier description of the products
|
||||
|
|
@ -4095,7 +4093,7 @@ class Form
|
|||
'type' => $outtype,
|
||||
'duration_value' => $outdurationvalue,
|
||||
'duration_unit' => $outdurationunit,
|
||||
'disabled' => empty($objp->idprodfournprice),
|
||||
'disabled' => (empty($objp->idprodfournprice) ? true : false),
|
||||
'description' => $objp->description
|
||||
);
|
||||
if (isModEnabled('multicurrency')) {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -101,6 +102,8 @@ class FormCategory extends Form
|
|||
|
||||
/**
|
||||
* Prints a select form for products categories
|
||||
* TODO Remove this. We should already have a generic method to get list of product category.
|
||||
*
|
||||
* @param int $selected Id category pre-selection
|
||||
* @param string $htmlname Name of HTML field
|
||||
* @param int $showempty Add an empty field
|
||||
|
|
@ -108,15 +111,14 @@ class FormCategory extends Form
|
|||
*/
|
||||
public function selectProductCategory($selected = 0, $htmlname = 'product_category_id', $showempty = 0)
|
||||
{
|
||||
$sql = "SELECT cp.fk_categorie as cat_index, cat.label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cp";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."categorie as cat ON cat.rowid = cp.fk_categorie";
|
||||
$sql .= " GROUP BY cp.fk_categorie, cat.label";
|
||||
$sql = "SELECT cat.rowid, cat.label";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."categorie as cat";
|
||||
$sql .= " WHERE cat.type = 0";
|
||||
|
||||
dol_syslog(get_class($this)."::selectProductCategory", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
print '<select class="flat" id="select_'.$htmlname.'" name="'.$htmlname.'">';
|
||||
print '<select class="flat minwidth100" id="select_'.$htmlname.'" name="'.$htmlname.'">';
|
||||
if ($showempty) {
|
||||
print '<option value="0"> </option>';
|
||||
}
|
||||
|
|
@ -125,10 +127,10 @@ class FormCategory extends Form
|
|||
$num_rows = $this->db->num_rows($resql);
|
||||
while ($i < $num_rows) {
|
||||
$category = $this->db->fetch_object($resql);
|
||||
if ($selected && $selected == $category->cat_index) {
|
||||
print '<option value="'.$category->cat_index.'" selected>'.$category->label.'</option>';
|
||||
if ($selected && $selected == $category->rowid) {
|
||||
print '<option value="'.$category->rowid.'" selected>'.$category->label.'</option>';
|
||||
} else {
|
||||
print '<option value="'.$category->cat_index.'">'.$category->label.'</option>';
|
||||
print '<option value="'.$category->rowid.'">'.$category->label.'</option>';
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -123,7 +123,7 @@ class FormFile
|
|||
$title = $langs->trans("AttachANewFile");
|
||||
}
|
||||
if ($title != 'none') {
|
||||
$out .= load_fiche_titre($title, null, null);
|
||||
$out .= load_fiche_titre($title, '', '');
|
||||
}
|
||||
|
||||
if (empty($usewithoutform)) { // Try to avoid this and set instead the form by the caller.
|
||||
|
|
@ -222,7 +222,7 @@ class FormFile
|
|||
$out .= "\n".'<!-- Start form link new url --><div class="formlinknewurl">'."\n";
|
||||
$langs->load('link');
|
||||
$title = $langs->trans("LinkANewFile");
|
||||
$out .= load_fiche_titre($title, null, null);
|
||||
$out .= load_fiche_titre($title, '', '');
|
||||
|
||||
if (empty($usewithoutform)) {
|
||||
$out .= '<form name="'.$htmlname.'_link" id="'.$htmlname.'_link" action="'.$url.'" method="POST">'."\n";
|
||||
|
|
|
|||
|
|
@ -524,13 +524,13 @@ class FormOther
|
|||
if (!empty($user->socid)) {
|
||||
$sql_usr .= " AND u.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
if (getDolGlobalString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX')) {
|
||||
if (getDolUserString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX', getDolGlobalString('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX'))) {
|
||||
$sql_usr .= " AND u.employee <> 0";
|
||||
}
|
||||
if (getDolGlobalString('USER_HIDE_EXTERNAL_IN_COMBOBOX')) {
|
||||
if (getDolUserString('USER_HIDE_EXTERNAL_IN_COMBOBOX', getDolGlobalString('USER_HIDE_EXTERNAL_IN_COMBOBOX'))) {
|
||||
$sql_usr .= " AND u.fk_soc IS NULL";
|
||||
}
|
||||
if (getDolGlobalString('USER_HIDE_INACTIVE_IN_COMBOBOX')) {
|
||||
if (getDolUserString('USER_HIDE_INACTIVE_IN_COMBOBOX', getDolGlobalString('USER_HIDE_INACTIVE_IN_COMBOBOX'))) { // Can be set in setup of module User.
|
||||
$sql_usr .= " AND u.statut <> 0";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) Kai Blankenhorn <kaib@bitfolge.de>
|
||||
* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) Kai Blankenhorn <kaib@bitfolge.de>
|
||||
* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -107,7 +108,7 @@ class vCard
|
|||
/**
|
||||
* Format phone number.
|
||||
*
|
||||
* @param int $number numero de telephone
|
||||
* @param string $number numero de telephone
|
||||
* @param string $type Type ('cell')
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1715,8 +1715,8 @@ function complete_elementList_with_modules(&$elementList)
|
|||
/**
|
||||
* Show array with constants to edit
|
||||
*
|
||||
* @param array<string,array{type:string,label:string}> $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label)
|
||||
* where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ...
|
||||
* @param array<string,array{type:string,label:string}>|array<int,string> $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label)
|
||||
* where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ...
|
||||
* @param int<2,3> $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all, 3=No form nor button at all and each field has a unique name (form is output by caller, recommended) (typed as int<2,3> to highlight the deprecated values)
|
||||
* @param string $helptext Tooltip help to use for the column name of values
|
||||
* @param string $text Text to use for the column name of values
|
||||
|
|
@ -1767,7 +1767,6 @@ function form_constantes($tableau, $strictw3c = 2, $helptext = '', $text = 'Valu
|
|||
$const = $key;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT ";
|
||||
$sql .= "rowid";
|
||||
$sql .= ", ".$db->decrypt('name')." as name";
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ function getDolUserString($key, $default = '', $tmpuser = null)
|
|||
$tmpuser = $user;
|
||||
}
|
||||
|
||||
return (string) (empty($tmpuser->conf->$key) ? $default : $tmpuser->conf->$key);
|
||||
return (string) (isset($tmpuser->conf->$key) ? $tmpuser->conf->$key : $default);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -281,7 +281,7 @@ function getDolUserInt($key, $default = 0, $tmpuser = null)
|
|||
$tmpuser = $user;
|
||||
}
|
||||
|
||||
return (int) (empty($tmpuser->conf->$key) ? $default : $tmpuser->conf->$key);
|
||||
return (int) (isset($tmpuser->conf->$key) ? $tmpuser->conf->$key: $default);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -8413,7 +8413,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
|
|||
// Keep only some html tags and remove also some 'javascript:' strings
|
||||
if ($check == 'restricthtmlallowlinkscript') {
|
||||
$out = dol_string_onlythesehtmltags($out, 0, 1, 0, 0, array(), 1, 1);
|
||||
} elseif ($check == 'restricthtmlallowclass') {
|
||||
} elseif ($check == 'restricthtmlallowclass' || $check == 'restricthtmlallowunvalid') {
|
||||
$out = dol_string_onlythesehtmltags($out, 0, 0, 1);
|
||||
} else {
|
||||
$out = dol_string_onlythesehtmltags($out, 0, 1, 1);
|
||||
|
|
|
|||
|
|
@ -947,7 +947,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -983,7 +983,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1053,7 +1053,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1093,7 +1093,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1153,7 +1153,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1189,7 +1189,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1257,7 +1257,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1295,7 +1295,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1426,7 +1426,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1463,7 +1463,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1530,7 +1530,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1565,7 +1565,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1638,7 +1638,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1675,7 +1675,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1759,7 +1759,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1797,7 +1797,7 @@ class pdf_octopus extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1713,7 +1713,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1750,7 +1750,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1842,7 +1842,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1880,7 +1880,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -107,13 +107,13 @@ class modSociete extends DolibarrModules
|
|||
$r++;
|
||||
|
||||
/*
|
||||
$this->const[$r][0] = "COMPANY_HIDE_INACTIVE_IN_COMBOBOX";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = "hide thirdparty customer inative in combobox";
|
||||
$this->const[$r][4] = 1;
|
||||
$r++;
|
||||
*/
|
||||
$this->const[$r][0] = "COMPANY_HIDE_INACTIVE_IN_COMBOBOX";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = "hide thirdparty customer inative in combobox";
|
||||
$this->const[$r][4] = 1;
|
||||
$r++;
|
||||
*/
|
||||
|
||||
$this->const[$r][0] = "SOCIETE_ADD_REF_IN_LIST";
|
||||
$this->const[$r][1] = "yesno";
|
||||
|
|
@ -144,21 +144,21 @@ class modSociete extends DolibarrModules
|
|||
$this->rights[$r][4] = 'lire';
|
||||
|
||||
/*$r++;
|
||||
$this->rights[$r][0] = 241;
|
||||
$this->rights[$r][1] = 'Read thirdparties customers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_customer_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
$this->rights[$r][0] = 241;
|
||||
$this->rights[$r][1] = 'Read thirdparties customers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_customer_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 242;
|
||||
$this->rights[$r][1] = 'Read thirdparties suppliers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
*/
|
||||
$r++;
|
||||
$this->rights[$r][0] = 242;
|
||||
$this->rights[$r][1] = 'Read thirdparties suppliers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
*/
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 122; // id de la permission
|
||||
|
|
@ -168,21 +168,21 @@ class modSociete extends DolibarrModules
|
|||
$this->rights[$r][4] = 'creer';
|
||||
|
||||
/* $r++;
|
||||
$this->rights[$r][0] = 251;
|
||||
$this->rights[$r][1] = 'Create thirdparties customers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_customer_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
$this->rights[$r][0] = 251;
|
||||
$this->rights[$r][1] = 'Create thirdparties customers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_customer_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 252;
|
||||
$this->rights[$r][1] = 'Create thirdparties suppliers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
*/
|
||||
$r++;
|
||||
$this->rights[$r][0] = 252;
|
||||
$this->rights[$r][1] = 'Create thirdparties suppliers';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'thirdparty_supplier_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on
|
||||
$this->rights[$r][5] = 'read';
|
||||
*/
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 125; // id de la permission
|
||||
|
|
@ -215,14 +215,14 @@ class modSociete extends DolibarrModules
|
|||
$this->rights[$r][5] = 'voir';
|
||||
|
||||
/*
|
||||
$r++;
|
||||
$this->rights[$r][0] = 263;
|
||||
$this->rights[$r][1] = 'Read all third parties (without their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'client';
|
||||
$this->rights[$r][5] = 'readallthirdparties_advance';
|
||||
*/
|
||||
$r++;
|
||||
$this->rights[$r][0] = 263;
|
||||
$this->rights[$r][1] = 'Read all third parties (without their objects) by internal users (otherwise only if commercial contact). Not effective for external users (limited to themselves).';
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'client';
|
||||
$this->rights[$r][5] = 'readallthirdparties_advance';
|
||||
*/
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 281; // id de la permission
|
||||
|
|
@ -411,6 +411,7 @@ class modSociete extends DolibarrModules
|
|||
's.code_compta' => "company", 's.code_compta_fournisseur' => "company",
|
||||
's.client' => "company", 's.fournisseur' => "company",
|
||||
's.address' => "company", 's.zip' => "company", 's.town' => "company", 's.phone' => "company", 's.email' => "company",
|
||||
's.note_private' => 'company', 's.note_public' => "company",
|
||||
't.code' => "company",
|
||||
's.entity' => 'company',
|
||||
); // We define here only fields that use another picto
|
||||
|
|
@ -685,24 +686,24 @@ class modSociete extends DolibarrModules
|
|||
'table_element' => 'c_stcomm'
|
||||
),
|
||||
/*
|
||||
's.fk_prospectlevel' => array(
|
||||
'rule' => 'fetchidfromcodeid',
|
||||
'classfile' => '/core/class/cgenericdic.class.php',
|
||||
'class' => 'CGenericDic',
|
||||
'method' => 'fetch',
|
||||
'dict' => 'DictionaryProspectLevel',
|
||||
'element' => 'c_prospectlevel',
|
||||
'table_element' => 'c_prospectlevel'
|
||||
),*/
|
||||
// TODO
|
||||
// 's.fk_incoterms' => array(
|
||||
// 'rule' => 'fetchidfromcodeid',
|
||||
// 'classfile' => '/core/class/cincoterm.class.php',
|
||||
// 'class' => 'Cincoterm',
|
||||
// 'method' => 'fetch',
|
||||
// 'dict' => 'IncotermLabel'
|
||||
// )
|
||||
);
|
||||
's.fk_prospectlevel' => array(
|
||||
'rule' => 'fetchidfromcodeid',
|
||||
'classfile' => '/core/class/cgenericdic.class.php',
|
||||
'class' => 'CGenericDic',
|
||||
'method' => 'fetch',
|
||||
'dict' => 'DictionaryProspectLevel',
|
||||
'element' => 'c_prospectlevel',
|
||||
'table_element' => 'c_prospectlevel'
|
||||
),*/
|
||||
// TODO
|
||||
// 's.fk_incoterms' => array(
|
||||
// 'rule' => 'fetchidfromcodeid',
|
||||
// 'classfile' => '/core/class/cincoterm.class.php',
|
||||
// 'class' => 'Cincoterm',
|
||||
// 'method' => 'fetch',
|
||||
// 'dict' => 'IncotermLabel'
|
||||
// )
|
||||
);
|
||||
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||
$this->import_regex_array[$r] = array(//field order as per structure of table llx_societe
|
||||
's.status' => '^[0|1]',
|
||||
|
|
@ -981,7 +982,7 @@ class modSociete extends DolibarrModules
|
|||
'sr.datec' => 'date used for creating direct debit UMR formatted as '.dol_print_date(
|
||||
dol_now(),
|
||||
'%Y-%m-%d'
|
||||
),
|
||||
),
|
||||
'sr.bank' => 'bank name eg: "ING-Direct"',
|
||||
'sr.code_banque' => 'account sort code (GB)/Routing number (US) eg. "8456"',
|
||||
'sr.code_guichet' => "bank code for office/branch",
|
||||
|
|
@ -1008,8 +1009,8 @@ class modSociete extends DolibarrModules
|
|||
$this->import_fields_array[$r] = array('sr.fk_soc' => "ThirdPartyName*", 'sr.fk_user' => "User*");
|
||||
|
||||
$this->import_convertvalue_array[$r] = array(
|
||||
'sr.fk_soc' => array('rule' => 'fetchidfromref', 'classfile' => '/societe/class/societe.class.php', 'class' => 'Societe', 'method' => 'fetch', 'element' => 'ThirdParty'),
|
||||
'sr.fk_user' => array('rule' => 'fetchidfromref', 'classfile' => '/user/class/user.class.php', 'class' => 'User', 'method' => 'fetch', 'element' => 'User')
|
||||
'sr.fk_soc' => array('rule' => 'fetchidfromref', 'classfile' => '/societe/class/societe.class.php', 'class' => 'Societe', 'method' => 'fetch', 'element' => 'ThirdParty'),
|
||||
'sr.fk_user' => array('rule' => 'fetchidfromref', 'classfile' => '/user/class/user.class.php', 'class' => 'User', 'method' => 'fetch', 'element' => 'User')
|
||||
);
|
||||
$this->import_examplevalues_array[$r] = array('sr.fk_soc' => "MyBigCompany", 'sr.fk_user' => "login");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class modTicket extends DolibarrModules
|
|||
5 => array('TICKET_DELAY_BEFORE_FIRST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time before a first answer to a ticket (in hours). Display a warning in tickets list if not respected.', 0),
|
||||
6 => array('TICKET_DELAY_SINCE_LAST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time between two answers on the same ticket (in hours). Display a warning in tickets list if not respected.', 0),
|
||||
7 => array('TICKET_NOTIFY_AT_CLOSING', 'chaine', '0', 'Default notify contacts when closing a module', 0),
|
||||
8 => array('TICKET_PRODUCT_CATEGORY', 'chaine', 0, 'The category of product that is being used for ticket accounting', 0),
|
||||
8 => array('TICKET_PRODUCT_CATEGORY', 'chaine', 0, 'The category of product that is being used to find contract to link to created ticket', 0),
|
||||
9 => array('TICKET_NOTIFICATION_EMAIL_FROM', 'chaine', getDolGlobalString('MAIN_MAIL_EMAIL_FROM'), 'Email to use by default as sender for messages sent from Dolibarr', 0),
|
||||
10 => array('TICKET_MESSAGE_MAIL_INTRO', 'chaine', $langs->trans('TicketMessageMailIntroText'), 'Introduction text of ticket replies sent from Dolibarr', 0),
|
||||
11 => array('TICKET_MESSAGE_MAIL_SIGNATURE', 'chaine', $default_footer, 'Signature to use by default for messages sent from Dolibarr', 0),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -282,7 +282,7 @@ if (!GETPOST('code')) {
|
|||
|
||||
// Verify that email is a verified email
|
||||
/*if (empty($userinfo['email_verified'])) {
|
||||
setEventMessages($langs->trans('Bad value for email, email lwas not verified by Google'), null, 'errors');
|
||||
setEventMessages($langs->trans('Bad value for email, email was not verified by Google'), null, 'errors');
|
||||
$errorincheck++;
|
||||
}*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1132,7 +1132,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1168,7 +1168,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1235,7 +1235,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1272,7 +1272,7 @@ class pdf_azur extends ModelePDFPropales
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1235,7 +1235,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT1", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
@ -1268,7 +1268,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT2", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
@ -1326,7 +1326,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT1", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
@ -1361,7 +1361,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalLT2", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$total_localtax = ((isModEnabled("multicurrency") && isset($object->multicurrency_tx) && $object->multicurrency_tx != 1) ? price2num($tvaval * $object->multicurrency_tx, 'MT') : $tvaval);
|
||||
|
|
|
|||
|
|
@ -720,7 +720,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -745,7 +745,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -1021,7 +1021,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -1051,7 +1051,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -897,7 +897,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -927,7 +927,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -934,7 +934,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -966,7 +966,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -1019,7 +1019,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
|
||||
|
|
@ -1050,7 +1050,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -1018,7 +1018,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
@ -1048,7 +1048,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code).' ';
|
||||
$totalvat .= vatrate(abs($tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate(abs((float) $tvakey), 1).$tvacompl;
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -259,7 +260,7 @@ if ($mode == 'dolibarr' || !$disabled) {
|
|||
|
||||
<?php if (!empty($message)) { ?>
|
||||
<div class="center login_main_message">
|
||||
<?php dol_htmloutput_mesg($message, '', '', 1); ?>
|
||||
<?php dol_htmloutput_mesg($message, [], '', 1); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -300,7 +301,7 @@ if ($mode == 'dolibarr' || !$disabled) {
|
|||
|
||||
<?php if (!empty($message)) { ?>
|
||||
<div class="center login_main_message">
|
||||
<?php dol_htmloutput_mesg($message, '', '', 1); ?>
|
||||
<?php dol_htmloutput_mesg($message, [], '', 1); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
|||
|
|
@ -1190,6 +1190,44 @@ class CommandeFournisseur extends CommonOrder
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Classify not billed
|
||||
*
|
||||
* @param User $user Object user making the change
|
||||
* @return int Return integer <0 if KO, 0 if already not billed, >0 if OK
|
||||
*/
|
||||
public function classifyUnBilled(User $user)
|
||||
{
|
||||
if (empty($this->billed)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
$sql = 'UPDATE '.$this->db->prefix().'commande_fournisseur SET billed = 0';
|
||||
$sql .= " WHERE rowid = ".((int) $this->id).' AND fk_statut > '.self::STATUS_DRAFT;;
|
||||
|
||||
if (!$this->db->query($sql)) {
|
||||
dol_print_error($this->db);
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Call trigger
|
||||
$result = $this->call_trigger('ORDER_SUPPLIER_CLASSIFY_UNBILLED', $user);
|
||||
if ($result < 0) {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
// End call triggers
|
||||
|
||||
$this->billed = 1;
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Approve a supplier order
|
||||
*
|
||||
|
|
|
|||
|
|
@ -371,13 +371,6 @@ if (empty($reshook)) {
|
|||
|
||||
$result = $object->setStatus($user, $newstatus);
|
||||
if ($result > 0) {
|
||||
// Currently the "Re-open" also remove the billed flag because there is no button "Set unpaid" yet.
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur';
|
||||
$sql .= ' SET billed = 0';
|
||||
$sql .= ' WHERE rowid = '.((int) $object->id);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($newstatus == 0) {
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur';
|
||||
$sql .= ' SET fk_user_approve = null, fk_user_approve2 = null, date_approve = null, date_approve2 = null';
|
||||
|
|
@ -408,6 +401,13 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'classifyunbilled' && $usercancreate) {
|
||||
$ret = $object->classifyUnBilled($user);
|
||||
if ($ret < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Add a product line
|
||||
if ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && (GETPOST('alldate_start', 'alpha') || GETPOST('alldate_end', 'alpha')) && $usercancreate) {
|
||||
// Define date start and date end for all line
|
||||
|
|
@ -2632,6 +2632,11 @@ if ($action == 'create') {
|
|||
}
|
||||
}
|
||||
|
||||
// Classify unbilled manually
|
||||
if ($usercancreate && $object->billed > 0 && $object->statut > $object::STATUS_DRAFT) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifyunbilled&token='.newToken().'">'.$langs->trans("ClassifyUnbilled").'</a>';
|
||||
}
|
||||
|
||||
// Clone
|
||||
if ($usercancreate) {
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object=order">'.$langs->trans("ToClone").'</a>';
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ if (!function_exists('ftp_connect')) {
|
|||
print "</form>";
|
||||
|
||||
if ($user->hasRight('ftp', 'write')) {
|
||||
print load_fiche_titre($langs->trans("AttachANewFile"), null, null);
|
||||
print load_fiche_titre($langs->trans("AttachANewFile"), '', '');
|
||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="numero_ftp" value="'.$numero_ftp.'">';
|
||||
|
|
@ -630,7 +630,7 @@ if (!function_exists('ftp_connect')) {
|
|||
|
||||
print '<br><br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("AddFolder"), null, null);
|
||||
print load_fiche_titre($langs->trans("AddFolder"), '', '');
|
||||
print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="numero_ftp" value="'.$numero_ftp.'">';
|
||||
|
|
|
|||
|
|
@ -127,3 +127,6 @@ ALTER TABLE llx_actioncomm_reminder ADD COLUMN datedone datetime NULL;
|
|||
ALTER TABLE llx_product_attribute_combination2val ADD INDEX idx_product_att_com2v_prod_combination (fk_prod_combination);
|
||||
ALTER TABLE llx_product_attribute_combination2val ADD INDEX idx_product_att_com2v_prod_attr (fk_prod_attr);
|
||||
ALTER TABLE llx_product_attribute_combination2val ADD INDEX idx_product_att_com2v_prod_attr_val (fk_prod_attr_val);
|
||||
|
||||
ALTER TABLE llx_societe ADD COLUMN ip varchar(250);
|
||||
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN ip varchar(250);
|
||||
|
|
@ -40,6 +40,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature(
|
|||
remuneration_proposed integer,
|
||||
email_msgid varchar(175), -- Do not use a too large value, it generates trouble with unique index
|
||||
email_date datetime,
|
||||
fk_recruitment_origin INTEGER NULL
|
||||
fk_recruitment_origin INTEGER NULL,
|
||||
-- END MODULEBUILDER FIELDS
|
||||
ip varchar(250) --ip used to create record (for public submission page)
|
||||
) ENGINE=innodb;
|
||||
|
|
|
|||
|
|
@ -129,5 +129,7 @@ create table llx_societe
|
|||
fk_multicurrency integer,
|
||||
multicurrency_code varchar(3),
|
||||
|
||||
ip varchar(250), --ip used to create record (for public submission page)
|
||||
|
||||
import_key varchar(14) -- import key
|
||||
)ENGINE=innodb;
|
||||
|
|
|
|||
|
|
@ -2146,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLE
|
|||
DuplicateForbidden=Duplicate forbidden
|
||||
RemoveSpecialWords=Clean certain words when generating sub-accounts for customers or suppliers
|
||||
RemoveSpecialWordsHelp=Specify the words to be cleaned before calculating the customer or supplier account. Use a ";" between each word
|
||||
GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact)
|
||||
GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...)
|
||||
GDPRContactDesc=If you store personal data in your Information System, you can name the contact who is responsible for the General Data Protection Regulation here
|
||||
HelpOnTooltip=Help text to show on tooltip
|
||||
HelpOnTooltipDesc=Put text or a translation key here for the text to show in a tooltip when this field appears in a form
|
||||
|
|
|
|||
|
|
@ -722,6 +722,8 @@ TextUsedInTheMessageBody=Email body
|
|||
SendAcknowledgementByMail=Send confirmation email
|
||||
SendMail=Send email
|
||||
Email=Email
|
||||
EMail=Email
|
||||
EMails=Emails
|
||||
NoEMail=No email
|
||||
AlreadyRead=Already read
|
||||
NotRead=Unread
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ TicketsAutoNotifyClose=Automatically notify the third party when closing a ticke
|
|||
TicketsAutoNotifyCloseHelp=When closing a ticket, you will be proposed to send a message to one of third-party contacts. On mass closing, a message will be sent to one contact of the third party linked to the ticket.
|
||||
TicketWrongContact=Provided contact is not part of current ticket contacts. Email not sent.
|
||||
TicketChooseProductCategory=Product category for ticket support
|
||||
TicketChooseProductCategoryHelp=Select the product category of ticket support. This will be used to automatically link a contract to a ticket.
|
||||
TicketChooseProductCategoryHelp=Select the product category for support. The category will be used to find all contracts that include a product in this category. All contracts found will be linked to the created ticket.
|
||||
TicketUseCaptchaCode=Use graphical code (CAPTCHA) when creating a ticket
|
||||
TicketUseCaptchaCodeHelp=Adds CAPTCHA verification when creating a new ticket.
|
||||
TicketsAllowClassificationModificationIfClosed=Allow to modify classification of closed tickets
|
||||
|
|
|
|||
303
htdocs/multicurrency/class/currencyrate.class.php
Normal file
303
htdocs/multicurrency/class/currencyrate.class.php
Normal file
|
|
@ -0,0 +1,303 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.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/multicurrency/class/currencyrate.class.php
|
||||
* \ingroup multicurrency
|
||||
* \brief This file is a CRUD class file (Create/Read/Update/Delete) for currencyrate
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
|
||||
|
||||
/**
|
||||
* Class CurrencyRate
|
||||
*/
|
||||
class CurrencyRate extends CommonObjectLine
|
||||
{
|
||||
/**
|
||||
* @var string Id to identify managed objects
|
||||
*/
|
||||
public $element = 'multicurrency_rate';
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'multicurrency_rate';
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var double Rate
|
||||
*/
|
||||
public $rate;
|
||||
|
||||
/**
|
||||
* @var double Rate Indirect
|
||||
*/
|
||||
public $rate_indirect;
|
||||
|
||||
/**
|
||||
* @var integer Date synchronisation
|
||||
*/
|
||||
public $date_sync;
|
||||
|
||||
/**
|
||||
* @var int Id of currency
|
||||
*/
|
||||
public $fk_multicurrency;
|
||||
|
||||
/**
|
||||
* @var int Id of entity
|
||||
*/
|
||||
public $entity;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create object into database
|
||||
*
|
||||
* @param User $user User making the deletion
|
||||
* @param int $fk_multicurrency Id of currency
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, Id of created object if OK
|
||||
*/
|
||||
public function create(User $user, int $fk_multicurrency, $notrigger = 0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
dol_syslog('CurrencyRate::create', LOG_DEBUG);
|
||||
|
||||
$error = 0;
|
||||
$this->rate = (float) price2num($this->rate);
|
||||
if (empty($this->entity) || $this->entity <= 0) {
|
||||
$this->entity = $conf->entity;
|
||||
}
|
||||
$now = empty($this->date_sync) ? dol_now() : $this->date_sync;
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."(";
|
||||
$sql .= ' rate,';
|
||||
$sql .= ' rate_indirect,';
|
||||
$sql .= ' date_sync,';
|
||||
$sql .= ' fk_multicurrency,';
|
||||
$sql .= ' entity';
|
||||
$sql .= ') VALUES (';
|
||||
$sql .= ' '.((float) $this->rate).',';
|
||||
$sql .= ' '.((float) $this->rate_indirect).',';
|
||||
$sql .= " '".$this->db->idate($now)."',";
|
||||
$sql .= " ".((int) $fk_multicurrency).",";
|
||||
$sql .= " ".((int) $this->entity);
|
||||
$sql .= ')';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::create '.implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
|
||||
$this->fk_multicurrency = $fk_multicurrency;
|
||||
$this->date_sync = $now;
|
||||
|
||||
if (empty($notrigger)) {
|
||||
$result = $this->call_trigger('CURRENCYRATE_CREATE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
|
||||
return -1 * $error;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @return int Return integer <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
public function fetch($id)
|
||||
{
|
||||
dol_syslog('CurrencyRate::fetch', LOG_DEBUG);
|
||||
|
||||
$sql = "SELECT cr.rowid, cr.rate, cr.rate_indirect, cr.date_sync, cr.fk_multicurrency, cr.entity";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." AS cr";
|
||||
$sql .= " WHERE cr.rowid = ".((int) $id);
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$numrows = $this->db->num_rows($resql);
|
||||
if ($numrows) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->rate = $obj->rate;
|
||||
$this->rate_indirect = $obj->rate_indirect;
|
||||
$this->date_sync = $this->db->jdate($obj->date_sync);
|
||||
$this->fk_multicurrency = $obj->fk_multicurrency;
|
||||
$this->entity = $obj->entity;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
if ($numrows) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::fetch '.implode(',', $this->errors), LOG_ERR);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update object into database
|
||||
*
|
||||
* @param User $user User making the deletion
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function update(User $user, $notrigger = 0)
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
dol_syslog('CurrencyRate::update', LOG_DEBUG);
|
||||
|
||||
$this->rate = (float) price2num($this->rate);
|
||||
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= "SET rate = ".((float) $this->rate);
|
||||
if (!empty($this->date_sync)) {
|
||||
$sql .= ", date_sync = '".$this->db->idate($this->date_sync)."'";
|
||||
}
|
||||
if (!empty($this->fk_multicurrency)) {
|
||||
$sql .= ', fk_multicurrency = '.((int) $this->fk_multicurrency);
|
||||
}
|
||||
$sql .= " WHERE rowid =".((int) $this->id);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::update '.implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
if (!$error && empty($notrigger)) {
|
||||
$result = $this->call_trigger('CURRENCYRATE_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
|
||||
return -1 * $error;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete object in database
|
||||
*
|
||||
* @param User $user User making the deletion
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function delete(User $user, $notrigger = 0)
|
||||
{
|
||||
dol_syslog('CurrencyRate::delete', LOG_DEBUG);
|
||||
|
||||
$error = 0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
if (empty($notrigger)) {
|
||||
$result = $this->call_trigger('CURRENCYRATE_DELETE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::delete '.implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
|
||||
return -1 * $error;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -27,10 +27,8 @@
|
|||
* \brief This file is a CRUD class file (Create/Read/Update/Delete) for multicurrency
|
||||
*/
|
||||
|
||||
// Put here all includes required by your class file
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/currencyrate.class.php';
|
||||
|
||||
/**
|
||||
* Class Currency
|
||||
|
|
@ -728,276 +726,3 @@ class MultiCurrency extends CommonObject
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class CurrencyRate
|
||||
*/
|
||||
class CurrencyRate extends CommonObjectLine
|
||||
{
|
||||
/**
|
||||
* @var string Id to identify managed objects
|
||||
*/
|
||||
public $element = 'multicurrency_rate';
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'multicurrency_rate';
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var double Rate
|
||||
*/
|
||||
public $rate;
|
||||
|
||||
/**
|
||||
* @var double Rate Indirect
|
||||
*/
|
||||
public $rate_indirect;
|
||||
|
||||
/**
|
||||
* @var integer Date synchronisation
|
||||
*/
|
||||
public $date_sync;
|
||||
|
||||
/**
|
||||
* @var int Id of currency
|
||||
*/
|
||||
public $fk_multicurrency;
|
||||
|
||||
/**
|
||||
* @var int Id of entity
|
||||
*/
|
||||
public $entity;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct(DoliDB $db)
|
||||
{
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create object into database
|
||||
*
|
||||
* @param User $user User making the deletion
|
||||
* @param int $fk_multicurrency Id of currency
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, Id of created object if OK
|
||||
*/
|
||||
public function create(User $user, int $fk_multicurrency, $notrigger = 0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
dol_syslog('CurrencyRate::create', LOG_DEBUG);
|
||||
|
||||
$error = 0;
|
||||
$this->rate = (float) price2num($this->rate);
|
||||
if (empty($this->entity) || $this->entity <= 0) {
|
||||
$this->entity = $conf->entity;
|
||||
}
|
||||
$now = empty($this->date_sync) ? dol_now() : $this->date_sync;
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."(";
|
||||
$sql .= ' rate,';
|
||||
$sql .= ' rate_indirect,';
|
||||
$sql .= ' date_sync,';
|
||||
$sql .= ' fk_multicurrency,';
|
||||
$sql .= ' entity';
|
||||
$sql .= ') VALUES (';
|
||||
$sql .= ' '.((float) $this->rate).',';
|
||||
$sql .= ' '.((float) $this->rate_indirect).',';
|
||||
$sql .= " '".$this->db->idate($now)."',";
|
||||
$sql .= " ".((int) $fk_multicurrency).",";
|
||||
$sql .= " ".((int) $this->entity);
|
||||
$sql .= ')';
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::create '.implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
|
||||
$this->fk_multicurrency = $fk_multicurrency;
|
||||
$this->date_sync = $now;
|
||||
|
||||
if (empty($notrigger)) {
|
||||
$result = $this->call_trigger('CURRENCYRATE_CREATE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
|
||||
return -1 * $error;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
|
||||
return $this->id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @return int Return integer <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
public function fetch($id)
|
||||
{
|
||||
dol_syslog('CurrencyRate::fetch', LOG_DEBUG);
|
||||
|
||||
$sql = "SELECT cr.rowid, cr.rate, cr.rate_indirect, cr.date_sync, cr.fk_multicurrency, cr.entity";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." AS cr";
|
||||
$sql .= " WHERE cr.rowid = ".((int) $id);
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$numrows = $this->db->num_rows($resql);
|
||||
if ($numrows) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->rate = $obj->rate;
|
||||
$this->rate_indirect = $obj->rate_indirect;
|
||||
$this->date_sync = $this->db->jdate($obj->date_sync);
|
||||
$this->fk_multicurrency = $obj->fk_multicurrency;
|
||||
$this->entity = $obj->entity;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
if ($numrows) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::fetch '.implode(',', $this->errors), LOG_ERR);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update object into database
|
||||
*
|
||||
* @param User $user User making the deletion
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function update(User $user, $notrigger = 0)
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
dol_syslog('CurrencyRate::update', LOG_DEBUG);
|
||||
|
||||
$this->rate = (float) price2num($this->rate);
|
||||
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= "SET rate = ".((float) $this->rate);
|
||||
if (!empty($this->date_sync)) {
|
||||
$sql .= ", date_sync = '".$this->db->idate($this->date_sync)."'";
|
||||
}
|
||||
if (!empty($this->fk_multicurrency)) {
|
||||
$sql .= ', fk_multicurrency = '.((int) $this->fk_multicurrency);
|
||||
}
|
||||
$sql .= " WHERE rowid =".((int) $this->id);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::update '.implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
|
||||
if (!$error && empty($notrigger)) {
|
||||
$result = $this->call_trigger('CURRENCYRATE_MODIFY', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
|
||||
return -1 * $error;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete object in database
|
||||
*
|
||||
* @param User $user User making the deletion
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
public function delete(User $user, $notrigger = 0)
|
||||
{
|
||||
dol_syslog('CurrencyRate::delete', LOG_DEBUG);
|
||||
|
||||
$error = 0;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
if (empty($notrigger)) {
|
||||
$result = $this->call_trigger('CURRENCYRATE_DELETE', $user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
$this->errors[] = 'Error '.$this->db->lasterror();
|
||||
dol_syslog('CurrencyRate::delete '.implode(',', $this->errors), LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
$this->db->rollback();
|
||||
|
||||
return -1 * $error;
|
||||
} else {
|
||||
$this->db->commit();
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ if ($action == 'create') {
|
|||
print_liste_field_titre($form->textwithpicto($langs->trans("AverageUnitPricePMPShort"), $langs->trans("AverageUnitPricePMPDesc")), "", "p.pmp", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
print_liste_field_titre("EstimatedStockValueShort", "", "", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("EstimatedStockValueShort", "", "svalue", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'totalvalue';
|
||||
$totalarray['type'][$totalarray['nbfield']] = '';
|
||||
|
|
@ -705,6 +705,7 @@ if ($action == 'create') {
|
|||
if (getDolGlobalString('PRODUCT_USE_UNITS')) {
|
||||
$sql .= ",fk_unit";
|
||||
}
|
||||
$sql .= ", (ps.reel * p.pmp) as svalue";
|
||||
// Add fields from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ if (empty($reshook)) {
|
|||
} else {
|
||||
if (!empty($batch)) {
|
||||
$error++;
|
||||
setEventMessages($langs->transnoentities('StockTransferNoBatchForProduct', $prod->getNomUrl()), '', 'errors');
|
||||
setEventMessages($langs->transnoentities('StockTransferNoBatchForProduct', $prod->getNomUrl()), null, 'errors');
|
||||
$action = 'editline';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -549,7 +549,7 @@ if (empty($reshook)) {
|
|||
$action = 'view';
|
||||
$comefromclone = true;
|
||||
|
||||
setEventMessages($langs->trans("ProjectCreatedInDolibarr", $newobject->ref), "", 'mesgs');
|
||||
setEventMessages($langs->trans("ProjectCreatedInDolibarr", $newobject->ref), null, 'mesgs');
|
||||
//var_dump($newobject); exit;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,6 +215,9 @@ if (empty($reshook) && $action == 'add') { // Test on permission not required he
|
|||
if (!$error) {
|
||||
$societe = new Societe($db);
|
||||
|
||||
// TODO Support MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS
|
||||
|
||||
|
||||
$societe->name = GETPOST('name', 'alphanohtml');
|
||||
|
||||
$societe->client = GETPOSTINT('client') ? GETPOSTINT('client') : $societe->client;
|
||||
|
|
|
|||
|
|
@ -212,16 +212,16 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!GETPOST("subject", "alphanohtml")) {
|
||||
$error++;
|
||||
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")));
|
||||
$action = '';
|
||||
}
|
||||
if (!GETPOST("message", "restricthtml")) {
|
||||
$error++;
|
||||
array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")));
|
||||
$action = '';
|
||||
}
|
||||
|
||||
$fieldsToCheck = [
|
||||
'type_code' => ['check' => 'alpha', 'langs' => 'TicketTypeRequest'],
|
||||
'category_code' => ['check' => 'alpha', 'langs' => 'TicketCategory'],
|
||||
'severity_code' => ['check' => 'alpha', 'langs' => 'TicketSeverity'],
|
||||
'subject' => ['check' => 'alphanohtml', 'langs' => 'Subject'],
|
||||
'message' => ['check' => 'restricthtml', 'langs' => 'Message']
|
||||
];
|
||||
|
||||
FormTicket::checkRequiredFields($fieldsToCheck, $error);
|
||||
|
||||
// Check email address
|
||||
if (!empty($origin_email) && !isValidEmail($origin_email)) {
|
||||
|
|
|
|||
|
|
@ -45,21 +45,25 @@ if (!defined('NOREQUIREAJAX')) {
|
|||
|
||||
session_cache_limiter('public');
|
||||
|
||||
if (!defined('MAIN_INC_REL_DIR')) {
|
||||
define('MAIN_INC_REL_DIR', '../../');
|
||||
}
|
||||
require_once __DIR__.'/../../webportal.main.inc.php';
|
||||
dol_include_once('/webportal/class/webPortalTheme.class.php');
|
||||
|
||||
// Define css type
|
||||
// top_httphead('text/css');
|
||||
top_httphead('text/css');
|
||||
/*
|
||||
header("Content-Type: text/css");
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
|
||||
*/
|
||||
// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access.
|
||||
// if (empty($dolibarr_nocache)) {
|
||||
if (empty($dolibarr_nocache)) {
|
||||
header('Cache-Control: max-age=10800, public, must-revalidate');
|
||||
/* } else {
|
||||
} else {
|
||||
header('Cache-Control: no-cache');
|
||||
} */
|
||||
}
|
||||
|
||||
$webPortalTheme = new WebPortalTheme();
|
||||
|
||||
|
|
@ -84,5 +88,5 @@ $webPortalTheme = new WebPortalTheme();
|
|||
}
|
||||
<?php
|
||||
|
||||
print '/* Here, the content of the common custom CSS defined into Home - Setup - Display - CSS'."*/\n";
|
||||
print '/* Here, the content of the common custom CSS defined into Home - Setup - Display - CSS */'."\n";
|
||||
print getDolGlobalString('WEBPORTAL_CUSTOM_CSS');
|
||||
|
|
|
|||
|
|
@ -76,8 +76,11 @@ if (!function_exists('dol_getprefix')) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
include '../../main.inc.php';
|
||||
$relDir = '';
|
||||
if (defined('MAIN_INC_REL_DIR')) {
|
||||
$relDir = MAIN_INC_REL_DIR;
|
||||
}
|
||||
include $relDir.'../../main.inc.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societeaccount.class.php';
|
||||
|
|
|
|||
|
|
@ -148,6 +148,10 @@ class RecruitmentCandidature extends CommonObject
|
|||
public $status;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
/**
|
||||
* @var string IP address
|
||||
*/
|
||||
public $ip;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2023-2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2023-2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -306,7 +306,7 @@ if ($action == 'create' || $object->fetch($id, $ref) > 0) {
|
|||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||
print '<td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('description', ($description ?: $object->description), '', 200, 'dolibarr_notes', false);
|
||||
$doleditor = new DolEditor('description', ($description ?: $object->description), '', 200, 'dolibarr_notes');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
* Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* 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
|
||||
|
|
@ -68,8 +69,8 @@ if (!$sortorder) {
|
|||
$sortorder = "DESC,DESC";
|
||||
}
|
||||
|
||||
// Initialize a technical objects
|
||||
$object = new PaymentSalary($db);
|
||||
// Initialize technical objects
|
||||
$object = new Salary($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$diroutputmassaction = $conf->user->dir_output.'/temp/massgeneration/'.$user->id;
|
||||
$hookmanager->initHooks(array('salarieslist')); // Note that conf->hooks_modules contains array
|
||||
|
|
@ -341,6 +342,9 @@ $sql = preg_replace('/,\s*$/', '', $sql);
|
|||
$sqlfields = $sql; // $sql fields to remove for count total
|
||||
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."salary as s";
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (s.rowid = ef.fk_object)";
|
||||
}
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as ps ON (ps.fk_salary = s.rowid) ";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON (s.fk_typepayment = pst.id) ";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account ba ON (ba.rowid = s.fk_account), ";
|
||||
|
|
@ -388,6 +392,8 @@ if ($search_status != '' && $search_status >= 0) {
|
|||
if ($search_type_id) {
|
||||
$sql .= " AND s.fk_typepayment=".((int) $search_type_id);
|
||||
}
|
||||
// Add where from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||
$sql .= " GROUP BY u.rowid, u.lastname, u.firstname, u.login, u.email, u.admin, u.photo, u.salary, u.fk_soc, u.statut,";
|
||||
$sql .= " s.rowid, s.fk_account, s.paye, s.fk_user, s.amount, s.salary, s.label, s.datesp, s.dateep, s.fk_typepayment, s.fk_bank,";
|
||||
$sql .= " ba.rowid, ba.ref, ba.number, ba.account_number, ba.fk_accountancy_journal, ba.label, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos,";
|
||||
|
|
@ -433,7 +439,7 @@ $num = $db->num_rows($resql);
|
|||
if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$id = $obj->rowid;
|
||||
header("Location: ".dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.$id);
|
||||
header("Location: ".DOL_URL_ROOT.'/salaries/card.php?id='.$id);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -644,6 +650,9 @@ if (isModEnabled("bank")) {
|
|||
}
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
|
||||
// Amount
|
||||
if (!empty($arrayfields['s.amount']['checked'])) {
|
||||
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
||||
|
|
@ -658,9 +667,6 @@ if (!empty($arrayfields['s.paye']['checked'])) {
|
|||
print '</td>';
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields' => $arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
|
|
@ -723,6 +729,9 @@ if (isModEnabled("bank")) {
|
|||
}
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
|
||||
if (!empty($arrayfields['s.amount']['checked'])) {
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "s.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
|
|
@ -733,8 +742,6 @@ if (!empty($arrayfields['s.paye']['checked'])) {
|
|||
$totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
|
|
@ -924,7 +931,8 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
}
|
||||
|
||||
// if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
|
||||
// Amount
|
||||
if (!empty($arrayfields['s.amount']['checked'])) {
|
||||
|
|
@ -946,8 +954,6 @@ while ($i < $imaxinloop) {
|
|||
}
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
|
|
|
|||
|
|
@ -1436,9 +1436,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
print '<td class="titlefieldcreate">'.$form->editfieldkey('', 'customerprospect', '', $object, 0, 'string', '', 0).'</td>';
|
||||
}
|
||||
print '<td class="maxwidthonsmartphone"'.($conf->browser->layout != 'phone' ? 'colspan="3"' : 'colspan="2"').'>';
|
||||
print '<span id="spannature1" class="spannature prospect-back paddinglarge marginrightonly"><label for="prospectinput" class="valignmiddle">'.$langs->trans("Prospect").'<input id="prospectinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'></label></span>';
|
||||
|
||||
print '<span id="spannature2" class="spannature customer-back paddinglarge marginrightonly"><label for="customerinput" class="valignmiddle">'.$langs->trans("Customer").'<input id="customerinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'></label></span>';
|
||||
if (!getDolGlobalString('SOCIETE_DISABLE_PROSPECTS')) {
|
||||
print '<span id="spannature1" class="spannature prospect-back paddinglarge marginrightonly"><label for="prospectinput" class="valignmiddle">'.$langs->trans("Prospect").'<input id="prospectinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'></label></span>';
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) {
|
||||
print '<span id="spannature2" class="spannature customer-back paddinglarge marginrightonly"><label for="customerinput" class="valignmiddle">'.$langs->trans("Customer").'<input id="customerinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'></label></span>';
|
||||
}
|
||||
|
||||
if ((isModEnabled("fournisseur") && $user->hasRight('fournisseur', 'lire') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire'))
|
||||
|| (isModEnabled('supplier_proposal') && $user->hasRight('supplier_proposal', 'lire'))) {
|
||||
|
|
@ -1451,24 +1456,38 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
print '<script>
|
||||
function refreshNatureCss() {
|
||||
jQuery(".spannature").each(function( index ) {
|
||||
console.log(jQuery("#spannature"+(index+1)+" .checkforselect").is(":checked"));
|
||||
if (jQuery("#spannature"+(index+1)+" .checkforselect").is(":checked")) {
|
||||
if (index+1 == 1) {
|
||||
jQuery("#spannature"+(index+1)).addClass("prospect-back").removeClass("nonature-back");
|
||||
id = $(this).attr("id").split("spannature")[1];
|
||||
console.log(jQuery("#spannature"+(id)+" .checkforselect").is(":checked"));
|
||||
if (jQuery("#spannature"+(id)+" .checkforselect").is(":checked")) {
|
||||
if (id == 1) {
|
||||
jQuery("#spannature"+(id)).addClass("prospect-back").removeClass("nonature-back");
|
||||
}
|
||||
if (index+1 == 2) {
|
||||
jQuery("#spannature"+(index+1)).addClass("customer-back").removeClass("nonature-back");
|
||||
if (id == 2) {
|
||||
jQuery("#spannature"+(id)).addClass("customer-back").removeClass("nonature-back");
|
||||
}
|
||||
if (index+1 == 3) {
|
||||
jQuery("#spannature"+(index+1)).addClass("vendor-back").removeClass("nonature-back");
|
||||
if (id == 3) {
|
||||
jQuery("#spannature"+(id)).addClass("vendor-back").removeClass("nonature-back");
|
||||
}
|
||||
} else {
|
||||
jQuery("#spannature"+(index+1)).removeClass("prospect-back").removeClass("customer-back").removeClass("vendor-back").addClass("nonature-back");
|
||||
jQuery("#spannature"+(id)).removeClass("prospect-back").removeClass("customer-back").removeClass("vendor-back").addClass("nonature-back");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function manageprospectcustomer(element) {
|
||||
console.log("We uncheck unwanted values on a nature");
|
||||
id = $(element).attr("id").split("spannature")[1];
|
||||
if ( id == 1){
|
||||
$("#spannature2 .checkforselect").prop("checked", false);
|
||||
}
|
||||
if ( id == 2){
|
||||
$("#spannature1 .checkforselect").prop("checked", false);
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(".spannature").click(function(){
|
||||
console.log("We click on a nature");
|
||||
'.(getDolGlobalString('SOCIETE_DISABLE_PROSPECTSCUSTOMERS') ? 'manageprospectcustomer($(this));' : '').'
|
||||
refreshNatureCss();
|
||||
});
|
||||
refreshNatureCss();
|
||||
|
|
@ -2229,10 +2248,14 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$selectedcustomer = (GETPOSTISSET('customer') ? GETPOSTINT('customer') : $selectedcustomer);
|
||||
print '<tr class="marginbottomlarge height50"><td class="titlefieldcreate">'.$form->editfieldkey('', 'customerprospect', '', $object, 0, 'string', '', 0).'</td>';
|
||||
print '<td class="maxwidthonsmartphone" colspan="3">';
|
||||
print '<span id="spannature1" class="spannature prospect-back paddinglarge marginrightonly"><label for="prospectinput" class="valignmiddle">'.$langs->trans("Prospect").'<input id="prospectinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'></label></span>';
|
||||
|
||||
print '<span id="spannature2" class="spannature customer-back paddinglarge marginrightonly"><label for="customerinput" class="valignmiddle">'.$langs->trans("Customer").'<input id="customerinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'></label></span>';
|
||||
if (!getDolGlobalString('SOCIETE_DISABLE_PROSPECTS')) {
|
||||
print '<span id="spannature1" class="spannature prospect-back paddinglarge marginrightonly"><label for="prospectinput" class="valignmiddle">'.$langs->trans("Prospect").'<input id="prospectinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="prospect" value="2"'.($selectedprospect ? ' checked="checked"' : '').'></label></span>';
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) {
|
||||
print '<span id="spannature2" class="spannature customer-back paddinglarge marginrightonly"><label for="customerinput" class="valignmiddle">'.$langs->trans("Customer").'<input id="customerinput" class="flat checkforselect marginleftonly valignmiddle" type="checkbox" name="customer" value="1"'.($selectedcustomer ? ' checked="checked"' : '').'></label></span>';
|
||||
}
|
||||
if ((isModEnabled("fournisseur") && $user->hasRight('fournisseur', 'lire') && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire'))
|
||||
|| (isModEnabled('supplier_proposal') && $user->hasRight('supplier_proposal', 'lire'))) {
|
||||
// Supplier
|
||||
|
|
@ -2245,24 +2268,38 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
print '<script>
|
||||
function refreshNatureCss() {
|
||||
jQuery(".spannature").each(function( index ) {
|
||||
console.log(jQuery("#spannature"+(index+1)+" .checkforselect").is(":checked"));
|
||||
if (jQuery("#spannature"+(index+1)+" .checkforselect").is(":checked")) {
|
||||
if (index+1 == 1) {
|
||||
jQuery("#spannature"+(index+1)).addClass("prospect-back").removeClass("nonature-back");
|
||||
id = $(this).attr("id").split("spannature")[1];
|
||||
console.log(jQuery("#spannature"+(id)+" .checkforselect").is(":checked"));
|
||||
if (jQuery("#spannature"+(id)+" .checkforselect").is(":checked")) {
|
||||
if (id == 1) {
|
||||
jQuery("#spannature"+(id)).addClass("prospect-back").removeClass("nonature-back");
|
||||
}
|
||||
if (index+1 == 2) {
|
||||
jQuery("#spannature"+(index+1)).addClass("customer-back").removeClass("nonature-back");
|
||||
if (id == 2) {
|
||||
jQuery("#spannature"+(id)).addClass("customer-back").removeClass("nonature-back");
|
||||
}
|
||||
if (index+1 == 3) {
|
||||
jQuery("#spannature"+(index+1)).addClass("vendor-back").removeClass("nonature-back");
|
||||
if (id == 3) {
|
||||
jQuery("#spannature"+(id)).addClass("vendor-back").removeClass("nonature-back");
|
||||
}
|
||||
} else {
|
||||
jQuery("#spannature"+(index+1)).removeClass("prospect-back").removeClass("customer-back").removeClass("vendor-back").addClass("nonature-back");
|
||||
jQuery("#spannature"+(id)).removeClass("prospect-back").removeClass("customer-back").removeClass("vendor-back").addClass("nonature-back");
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function manageprospectcustomer(element) {
|
||||
console.log("We uncheck unwanted values on a nature");
|
||||
id = $(element).attr("id").split("spannature")[1];
|
||||
if ( id == 1){
|
||||
$("#spannature2 .checkforselect").prop("checked", false);
|
||||
}
|
||||
if ( id == 2){
|
||||
$("#spannature1 .checkforselect").prop("checked", false);
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(".spannature").click(function(){
|
||||
console.log("We click on a nature");
|
||||
'.(getDolGlobalString('SOCIETE_DISABLE_PROSPECTSCUSTOMERS') ? 'manageprospectcustomer($(this));' : '').'
|
||||
refreshNatureCss();
|
||||
});
|
||||
refreshNatureCss();
|
||||
|
|
|
|||
|
|
@ -783,6 +783,11 @@ class Societe extends CommonObject
|
|||
*/
|
||||
public $ref_ext;
|
||||
|
||||
/**
|
||||
* @var string IP address
|
||||
*/
|
||||
public $ip;
|
||||
|
||||
/**
|
||||
* Import key.
|
||||
* Set when the thirdparty has been created through an import process. This is to relate those created thirdparties
|
||||
|
|
|
|||
|
|
@ -1141,7 +1141,7 @@ if (!empty($type)) {
|
|||
}
|
||||
|
||||
if ($contextpage == 'poslist' && $type == 't' && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'))) {
|
||||
print get_htmloutput_mesg(img_warning('default').' '.$langs->trans("BecarefullChangeThirdpartyBeforeAddProductToInvoice"), '', 'warning', 1);
|
||||
print get_htmloutput_mesg(img_warning('default').' '.$langs->trans("BecarefullChangeThirdpartyBeforeAddProductToInvoice"), [], 'warning', 1);
|
||||
}
|
||||
|
||||
// Show the new button only when this page is not opend from the Extended POS (pop-up window)
|
||||
|
|
|
|||
|
|
@ -894,10 +894,10 @@ $head = societe_prepare_head($object);
|
|||
// Show sandbox warning
|
||||
/*if (isModEnabled('paypal') && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox','alpha'))) // We can force sand box with param 'forcesandbox'
|
||||
{
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode','Paypal'),'','warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Paypal'), [], 'warning');
|
||||
}*/
|
||||
if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning');
|
||||
}
|
||||
|
||||
// Load Bank account
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // TODO Not used by current c
|
|||
if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning');
|
||||
} else {
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018-2022 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -72,7 +72,7 @@ llxHeader('', $langs->trans("StripeChargeList"));
|
|||
if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning');
|
||||
} else {
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class ActionsStripeconnect extends CommonHookActions
|
|||
|
||||
if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
$service = 'StripeTest';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning');
|
||||
} else {
|
||||
$service = 'StripeLive';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018-2023 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -73,7 +73,7 @@ llxHeader('', $langs->trans("StripePayoutList"));
|
|||
if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning');
|
||||
} else {
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018-2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -75,7 +75,7 @@ llxHeader('', $langs->trans("StripeTransactionList"));
|
|||
if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning');
|
||||
} else {
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2021 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -251,7 +252,7 @@ if (isModEnabled("bank")) {
|
|||
if (isModEnabled('stripe') && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
$service = 'StripeTest';
|
||||
$servicestatus = '0';
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning');
|
||||
} else {
|
||||
$service = 'StripeLive';
|
||||
$servicestatus = '1';
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
/**
|
||||
* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022-2023 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2018 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022-2023 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -236,19 +237,19 @@ if (empty($reshook)) {
|
|||
$allowstockchange = (getDolGlobalString($constantforkey) != "1");
|
||||
|
||||
if ($error) {
|
||||
dol_htmloutput_errors($errormsg, null, 1);
|
||||
dol_htmloutput_errors($errormsg, [], 1);
|
||||
} elseif ($invoice->status != Facture::STATUS_DRAFT) {
|
||||
//If invoice is validated but it is not fully paid is not error and make the payment
|
||||
if ($invoice->getRemainToPay() > 0) {
|
||||
$res = 1;
|
||||
} else {
|
||||
dol_syslog("Sale already validated");
|
||||
dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), null, 1);
|
||||
dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), [], 1);
|
||||
}
|
||||
} elseif (count($invoice->lines) == 0) {
|
||||
$error++;
|
||||
dol_syslog('Sale without lines');
|
||||
dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1);
|
||||
dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), [], 1);
|
||||
} elseif (isModEnabled('stock') && !isModEnabled('productbatch') && $allowstockchange) {
|
||||
// Validation of invoice with change into stock when produt/lot module is NOT enabled and stock change NOT disabled.
|
||||
// The case for isModEnabled('productbatch') is processed few lines later.
|
||||
|
|
@ -606,7 +607,7 @@ if (empty($reshook)) {
|
|||
|
||||
if ($invoice->socid <= 0) {
|
||||
$langs->load('errors');
|
||||
dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), null, 1);
|
||||
dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), [], 1);
|
||||
} else {
|
||||
$db->begin();
|
||||
|
||||
|
|
@ -968,7 +969,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
if (!$permissiontoupdateline) {
|
||||
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos").' - No permission to updateqty', null, 1);
|
||||
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos").' - No permission to updateqty', [], 1);
|
||||
} else {
|
||||
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $number, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||
}
|
||||
|
|
@ -1013,7 +1014,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
if (!$permissiontoupdateline) {
|
||||
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos").' - No permission to updateprice', null, 1);
|
||||
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos").' - No permission to updateprice', [], 1);
|
||||
} elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) {
|
||||
$result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||
} else {
|
||||
|
|
@ -1058,7 +1059,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
if (!$permissiontoupdateline) {
|
||||
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1);
|
||||
dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), [], 1);
|
||||
} else {
|
||||
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ function fetchConnectionToken() {
|
|||
}
|
||||
|
||||
if (isModEnabled('stripe') && isset($keyforstripeterminalbank) && (!getDolGlobalString('STRIPE_LIVE') || GETPOST('forcesandbox', 'alpha'))) {
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning', 1);
|
||||
dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), [], 'warning', 1);
|
||||
}
|
||||
|
||||
$invoice = new Facture($db);
|
||||
|
|
@ -606,7 +606,7 @@ array(
|
|||
$numpad = getDolGlobalString('TAKEPOS_NUMPAD');
|
||||
if (isModEnabled('stripe') && isset($keyforstripeterminalbank) && getDolGlobalString('STRIPE_CARD_PRESENT')) {
|
||||
print '<span id="card-present-alert">';
|
||||
dol_htmloutput_mesg($langs->trans('ConnectingToStripeTerminal', 'Stripe'), '', 'warning', 1);
|
||||
dol_htmloutput_mesg($langs->trans('ConnectingToStripeTerminal', 'Stripe'), [], 'warning', 1);
|
||||
print '</span>';
|
||||
}
|
||||
print '<button type="button" class="calcbutton" onclick="addreceived('.($numpad == 0 ? '7' : '10').')">'.($numpad == 0 ? '7' : '10').'</button>';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Andreu Bisquerra <jove@bisquerra.com>
|
||||
/* Copyright (C) 2021 Andreu Bisquerra <jove@bisquerra.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -73,7 +74,7 @@ if ($action=="split" && $user->hasRight('takepos', 'run')) {
|
|||
$invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity;
|
||||
if ($invoice->socid <= 0) {
|
||||
$langs->load('errors');
|
||||
dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), null, 1);
|
||||
dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), [], 1);
|
||||
} else {
|
||||
$placeid = $invoice->create($user);
|
||||
if ($placeid < 0) {
|
||||
|
|
@ -102,7 +103,7 @@ if ($action=="split" && $user->hasRight('takepos', 'run')) {
|
|||
$invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity;
|
||||
if ($invoice->socid <= 0) {
|
||||
$langs->load('errors');
|
||||
dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), null, 1);
|
||||
dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), [], 1);
|
||||
} else {
|
||||
$placeid = $invoice->create($user);
|
||||
if ($placeid < 0) {
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
|||
border-radius: 3px;
|
||||
}
|
||||
.prospect-back {
|
||||
background-color: #b7d5c0 !important;
|
||||
background-color: #a7c5b0 !important;
|
||||
color: #FFF !important;
|
||||
padding: 2px;
|
||||
margin: 2px;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,13 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
|||
margin: 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.prospect-back {
|
||||
background-color: #a7c5b0 !important;
|
||||
color: #FFF !important;
|
||||
padding: 2px;
|
||||
margin: 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.customer-back {
|
||||
background-color: #65953d !important;
|
||||
color: #FFF !important;
|
||||
|
|
|
|||
|
|
@ -2415,7 +2415,7 @@ td.showDragHandle {
|
|||
padding-bottom: 20px;
|
||||
<?php if (GETPOST('optioncss', 'aZ09') != 'print') { ?>
|
||||
padding-<?php print $left; ?>: <?php echo $leftmenuwidth + 9; ?>px;
|
||||
padding-top: 16px;
|
||||
padding-top: 28px;
|
||||
<?php } ?>
|
||||
}
|
||||
.bodyforlist #id-right {
|
||||
|
|
|
|||
|
|
@ -1859,7 +1859,10 @@ class Ticket extends CommonObject
|
|||
$actioncomm->fk_element = $this->id;
|
||||
$actioncomm->fk_project = $this->fk_project;
|
||||
|
||||
// add contact id from author email on public interface
|
||||
// Add first contact id found in database from submitter email entered into public interface
|
||||
// Feature disabled: This has a security trouble. The public interface is a no login interface, so being able to show the contact info from an
|
||||
// email decided by the submiter allows anybody to get information on any contact (customer or supplier) in Dolibarr database.
|
||||
// He can even check if contact exists by trying any email if this feature is enabled.
|
||||
if ($public_area && !empty($this->origin_email) && getDolGlobalString('TICKET_ASSIGN_CONTACT_TO_MESSAGE')) {
|
||||
$contacts = $this->searchContactByEmail($this->origin_email);
|
||||
if (!empty($contacts)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -69,6 +70,9 @@ $server->soap_defencoding = 'UTF-8';
|
|||
$server->decode_utf8 = false;
|
||||
$ns = 'http://www.dolibarr.org/ns/';
|
||||
$server->configureWSDL('WebServicesDolibarrOther', $ns);
|
||||
|
||||
// $server->wsdl is expected to be a nusoap_xmlschema (default = \wsdl)
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$server->wsdl->schemaTargetNamespace = $ns;
|
||||
|
||||
|
||||
|
|
@ -80,11 +84,11 @@ $server->wsdl->addComplexType(
|
|||
'all',
|
||||
'',
|
||||
array(
|
||||
'dolibarrkey' => array('name'=>'dolibarrkey', 'type'=>'xsd:string'),
|
||||
'sourceapplication' => array('name'=>'sourceapplication', 'type'=>'xsd:string'),
|
||||
'login' => array('name'=>'login', 'type'=>'xsd:string'),
|
||||
'password' => array('name'=>'password', 'type'=>'xsd:string'),
|
||||
'entity' => array('name'=>'entity', 'type'=>'xsd:string'),
|
||||
'dolibarrkey' => array('name' => 'dolibarrkey', 'type' => 'xsd:string'),
|
||||
'sourceapplication' => array('name' => 'sourceapplication', 'type' => 'xsd:string'),
|
||||
'login' => array('name' => 'login', 'type' => 'xsd:string'),
|
||||
'password' => array('name' => 'password', 'type' => 'xsd:string'),
|
||||
'entity' => array('name' => 'entity', 'type' => 'xsd:string'),
|
||||
)
|
||||
);
|
||||
// Define WSDL Return object
|
||||
|
|
@ -95,8 +99,8 @@ $server->wsdl->addComplexType(
|
|||
'all',
|
||||
'',
|
||||
array(
|
||||
'result_code' => array('name'=>'result_code', 'type'=>'xsd:string'),
|
||||
'result_label' => array('name'=>'result_label', 'type'=>'xsd:string'),
|
||||
'result_code' => array('name' => 'result_code', 'type' => 'xsd:string'),
|
||||
'result_label' => array('name' => 'result_label', 'type' => 'xsd:string'),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -108,10 +112,10 @@ $server->wsdl->addComplexType(
|
|||
'all',
|
||||
'',
|
||||
array(
|
||||
'filename' => array('name'=>'filename', 'type'=>'xsd:string'),
|
||||
'mimetype' => array('name'=>'mimetype', 'type'=>'xsd:string'),
|
||||
'content' => array('name'=>'content', 'type'=>'xsd:string'),
|
||||
'length' => array('name'=>'length', 'type'=>'xsd:string')
|
||||
'filename' => array('name' => 'filename', 'type' => 'xsd:string'),
|
||||
'mimetype' => array('name' => 'mimetype', 'type' => 'xsd:string'),
|
||||
'content' => array('name' => 'content', 'type' => 'xsd:string'),
|
||||
'length' => array('name' => 'length', 'type' => 'xsd:string')
|
||||
)
|
||||
);
|
||||
|
||||
|
|
@ -130,9 +134,9 @@ $styleuse = 'encoded'; // encoded/literal/literal wrapped
|
|||
$server->register(
|
||||
'getVersions',
|
||||
// Entry values
|
||||
array('authentication'=>'tns:authentication'),
|
||||
array('authentication' => 'tns:authentication'),
|
||||
// Exit values
|
||||
array('result'=>'tns:result', 'dolibarr'=>'xsd:string', 'os'=>'xsd:string', 'php'=>'xsd:string', 'webserver'=>'xsd:string'),
|
||||
array('result' => 'tns:result', 'dolibarr' => 'xsd:string', 'os' => 'xsd:string', 'php' => 'xsd:string', 'webserver' => 'xsd:string'),
|
||||
$ns,
|
||||
$ns.'#getVersions',
|
||||
$styledoc,
|
||||
|
|
@ -144,9 +148,9 @@ $server->register(
|
|||
$server->register(
|
||||
'getDocument',
|
||||
// Entry values
|
||||
array('authentication'=>'tns:authentication', 'modulepart'=>'xsd:string', 'file'=>'xsd:string'),
|
||||
array('authentication' => 'tns:authentication', 'modulepart' => 'xsd:string', 'file' => 'xsd:string'),
|
||||
// Exit values
|
||||
array('result'=>'tns:result', 'document'=>'tns:document'),
|
||||
array('result' => 'tns:result', 'document' => 'tns:document'),
|
||||
$ns,
|
||||
$ns.'#getDocument',
|
||||
$styledoc,
|
||||
|
|
@ -159,8 +163,8 @@ $server->register(
|
|||
/**
|
||||
* Full methods code
|
||||
*
|
||||
* @param string $authentication Authentication string
|
||||
* @return array Array of data
|
||||
* @param array{login:string,password:string,entity:?int,dolibarrkey:string} $authentication Array with authentication information
|
||||
* @return array{result:array{result_code:string,result_label:string},dolibarr?:string,os?:string,php?:string,webserver?:string} Array of data
|
||||
*/
|
||||
function getVersions($authentication)
|
||||
{
|
||||
|
|
@ -182,7 +186,7 @@ function getVersions($authentication)
|
|||
|
||||
|
||||
if (!$error) {
|
||||
$objectresp['result'] = array('result_code'=>'OK', 'result_label'=>'');
|
||||
$objectresp['result'] = array('result_code' => 'OK', 'result_label' => '');
|
||||
$objectresp['dolibarr'] = version_dolibarr();
|
||||
$objectresp['os'] = version_os();
|
||||
$objectresp['php'] = version_php();
|
||||
|
|
@ -190,9 +194,10 @@ function getVersions($authentication)
|
|||
}
|
||||
|
||||
if ($error) {
|
||||
$objectresp = array('result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel));
|
||||
$objectresp = array('result' => array('result_code' => $errorcode, 'result_label' => $errorlabel));
|
||||
}
|
||||
|
||||
|
||||
return $objectresp;
|
||||
}
|
||||
|
||||
|
|
@ -200,11 +205,11 @@ function getVersions($authentication)
|
|||
/**
|
||||
* Method to get a document by webservice
|
||||
*
|
||||
* @param array $authentication Array with permissions
|
||||
* @param array{login:string,password:string,entity:?int,dolibarrkey:string} $authentication Array with authentication information
|
||||
* @param string $modulepart Properties of document
|
||||
* @param string $file Relative path
|
||||
* @param string $refname Ref of object to check permission for external users (autodetect if not provided)
|
||||
* @return array
|
||||
* @return array{result:array{result_code:string,result_label:string},document?:array{filename:string,mimetype:string,content:string,length:int}} Array of data
|
||||
*/
|
||||
function getDocument($authentication, $modulepart, $file, $refname = '')
|
||||
{
|
||||
|
|
@ -314,8 +319,8 @@ function getDocument($authentication, $modulepart, $file, $refname = '')
|
|||
|
||||
// Create return object
|
||||
$objectresp = array(
|
||||
'result'=>array('result_code'=>'OK', 'result_label'=>''),
|
||||
'document'=>$objectret
|
||||
'result' => array('result_code' => 'OK', 'result_label' => ''),
|
||||
'document' => $objectret
|
||||
);
|
||||
} else {
|
||||
dol_syslog("File doesn't exist ".$original_file);
|
||||
|
|
@ -328,7 +333,7 @@ function getDocument($authentication, $modulepart, $file, $refname = '')
|
|||
|
||||
if ($error) {
|
||||
$objectresp = array(
|
||||
'result'=>array('result_code' => $errorcode, 'result_label' => $errorlabel)
|
||||
'result' => array('result_code' => $errorcode, 'result_label' => $errorlabel)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ if (empty($sortfield)) {
|
|||
}
|
||||
}
|
||||
|
||||
$searchkey = GETPOST('searchstring', 'restricthtmlallowclass');
|
||||
$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring
|
||||
|
||||
if ($action == 'replacesite' || $mode == 'replacesite') { // Test on permission not required
|
||||
$containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : '';
|
||||
|
|
@ -583,7 +583,7 @@ if ($massaction == 'delcategory' && GETPOST('confirmmassaction', 'alpha') && $us
|
|||
|
||||
// Replacement of string into pages
|
||||
if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) {
|
||||
$replacestring = GETPOST('replacestring', 'none');
|
||||
$replacestring = GETPOST('replacestring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring
|
||||
|
||||
$dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT);
|
||||
$allowimportsite = true;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ parameters:
|
|||
- '#color.* expects int, string#'
|
||||
- '#imap.* expects int, string#'
|
||||
- '# (Setup|Asset|Proposals|Orders|Invoices|FactureRec|BonPrelevement|Products|Thirdparties)::_fetch\S*\(\) expects int, string#'
|
||||
- '#(getFullName|sendTicketMessageByEmail|addItemsFact|update_price|setPhoneNumber|recur|addDepreciationLine|addline|generate|buildRumNumber|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#'
|
||||
- '#(getFullName|sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|buildRumNumber|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#'
|
||||
- '#run_sql expects int, string#'
|
||||
- '#on array{url: mixed} in empty\(\) does not exist.#'
|
||||
- '#dol_copy expects string, int given#'
|
||||
|
|
@ -97,26 +97,21 @@ parameters:
|
|||
- '# (dol_strlen|vatrate) expects string, float(\|(int|array)(\<.*\>)?)* given.#'
|
||||
- '#create_line\(\) expects string, float given.#'
|
||||
- '# dol_stringtotime expects string, DateTime given.#'
|
||||
- '# (load_fiche_titre|dol_add_file_process) expects string, null given.#'
|
||||
- '# (show_ldap_content|projectLinesa) expects string, true given.#'
|
||||
- '# DolEditor constructor expects string, false given.#'
|
||||
- '# dol_eval expects string, array given.#'
|
||||
- '#expects string, bool\|mysqli_result\|resource given.#'
|
||||
- '#( |::)((multi)?selectarray)\(\) expects array#'
|
||||
- '# (reWriteAllMenus|check_authentication) expects array#'
|
||||
- '#::(_validateMyObject|select_company)\(\) expects array<string#'
|
||||
- '# (dol_print_error|get_htmloutput_mesg|dolGetButtonTitle|dol_htmloutput_errors|dol_htmloutput_mesg) expects array<string#'
|
||||
- '# (dol_print_error|dolGetButtonTitle) expects array<string#'
|
||||
- '# getNav expects array#'
|
||||
- '# getCommonSubstitutionArray expects array#'
|
||||
- '# ajax_constantonoff expects array, null given.#'
|
||||
- '# ldap_search expects array\|LDAP#'
|
||||
- '# ajax_combobox expects array#'
|
||||
- '# setEventMessages expects array#'
|
||||
- '# Context::setError\(\) expects array, string#'
|
||||
- '# Form::formconfirm\(\) expects array#'
|
||||
- '# FormWebPortal::selectForForms\(\) expects int, array#'
|
||||
- '# Lettering::getBankLinesFromFkDocAndDocType\(\) expects array#'
|
||||
- '# form_constantes expects array#'
|
||||
- '# (Odf) constructor expects #'
|
||||
- '# Stripe[^ ]+::all\(\) expects #'
|
||||
- '#expects resource#'
|
||||
|
|
|
|||
Loading…
Reference in a new issue