Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/langs/en_US/stocks.lang
This commit is contained in:
commit
03a1897089
@ -22,7 +22,7 @@ Following changes may create regressions for some external modules, but were nec
|
|||||||
For Users:
|
For Users:
|
||||||
|
|
||||||
NEW: Module BOM is now stable.
|
NEW: Module BOM is now stable.
|
||||||
NEW: Module MO - Manufacturing Order available with experimental status.
|
NEW: Module MO (Manufacturing Order) is available with experimental status.
|
||||||
NEW: Can set the Address/Contact by default on third parties.
|
NEW: Can set the Address/Contact by default on third parties.
|
||||||
NEW: Add a dictionary to edit list of Social networks.
|
NEW: Add a dictionary to edit list of Social networks.
|
||||||
NEW: A nicer dashboard for open elements on Home page.
|
NEW: A nicer dashboard for open elements on Home page.
|
||||||
|
|||||||
@ -16,7 +16,9 @@ then
|
|||||||
echo "This pull remote transifex files to local dir."
|
echo "This pull remote transifex files to local dir."
|
||||||
echo "Note: If you pull a language file (not source), file will be skipped if local file is newer."
|
echo "Note: If you pull a language file (not source), file will be skipped if local file is newer."
|
||||||
echo " Using -f will overwrite local file (does not work with 'all')."
|
echo " Using -f will overwrite local file (does not work with 'all')."
|
||||||
echo "Usage: ./dev/translation/txpull.sh (all|xx_XX) [-r dolibarr.file] [-f] [-s]"
|
echo " Using -s will force fetching of source file (avoid it, use en_US as language instead)."
|
||||||
|
echo " Using en_US as language parameter will update source language from transifex (en_US is excluded from 'all')."
|
||||||
|
echo "Usage: ./dev/translation/txpull.sh (all|en_US|xx_XX) [-r dolibarr.file] [-f] [-s]"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -595,13 +595,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
print '<tr class="drag drop oddeven" id="row-'.$ruleaction['id'].'">';
|
print '<tr class="drag drop oddeven" id="row-'.$ruleaction['id'].'">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
print '<!-- type of action: '.$ruleaction['type'].' -->';
|
||||||
print $langs->trans($arrayoftypes[$ruleaction['type']]);
|
print $langs->trans($arrayoftypes[$ruleaction['type']]);
|
||||||
if (in_array($ruleaction['type'], array('recordevent')))
|
if (in_array($ruleaction['type'], array('recordevent')))
|
||||||
{
|
{
|
||||||
print $form->textwithpicto('', $langs->transnoentitiesnoconv('IfTrackingIDFoundEventWillBeLinked'));
|
print $form->textwithpicto('', $langs->transnoentitiesnoconv('IfTrackingIDFoundEventWillBeLinked'));
|
||||||
}
|
}
|
||||||
|
elseif (in_array($ruleaction['type'], array('loadthirdparty', 'loadandcreatethirdparty'))) {
|
||||||
|
print $form->textwithpicto('', $langs->transnoentitiesnoconv('EmailCollectorLoadThirdPartyHelp'));
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td class="wordbreak">';
|
||||||
if ($action == 'editoperation' && $ruleaction['id'] == $operationid)
|
if ($action == 'editoperation' && $ruleaction['id'] == $operationid)
|
||||||
{
|
{
|
||||||
print '<input type="text" class="quatrevingtquinzepercent" name="operationparam2" value="'.$ruleaction['actionparam'].'"><br>';
|
print '<input type="text" class="quatrevingtquinzepercent" name="operationparam2" value="'.$ruleaction['actionparam'].'"><br>';
|
||||||
|
|||||||
@ -75,7 +75,7 @@ print '<br>';
|
|||||||
$file_list = array('missing' => array(), 'updated' => array());
|
$file_list = array('missing' => array(), 'updated' => array());
|
||||||
|
|
||||||
// Local file to compare to
|
// Local file to compare to
|
||||||
$xmlshortfile = GETPOST('xmlshortfile', 'alpha') ?GETPOST('xmlshortfile', 'alpha') : '/install/filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml';
|
$xmlshortfile = GETPOST('xmlshortfile', 'alpha') ?GETPOST('xmlshortfile', 'alpha') : '/install/filelist-'.DOL_VERSION.(empty($conf->global->MAIN_FILECHECK_LOCAL_SUFFIX) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_SUFFIX).'.xml'.(empty($conf->global->MAIN_FILECHECK_LOCAL_EXT) ? '' : $conf->global->MAIN_FILECHECK_LOCAL_EXT);
|
||||||
$xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile;
|
$xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile;
|
||||||
// Remote file to compare to
|
// Remote file to compare to
|
||||||
$xmlremote = GETPOST('xmlremote');
|
$xmlremote = GETPOST('xmlremote');
|
||||||
|
|||||||
@ -899,7 +899,10 @@ class DolGraph
|
|||||||
}
|
}
|
||||||
|
|
||||||
$legends=array();
|
$legends=array();
|
||||||
|
$nblot=0;
|
||||||
|
if (is_array($this->data) && is_array($this->data[0])) {
|
||||||
$nblot=count($this->data[0])-1; // -1 to remove legend
|
$nblot=count($this->data[0])-1; // -1 to remove legend
|
||||||
|
}
|
||||||
if ($nblot < 0) dol_syslog('Bad value for property ->data. Must be set by mydolgraph->SetData before calling mydolgrapgh->draw', LOG_WARNING);
|
if ($nblot < 0) dol_syslog('Bad value for property ->data. Must be set by mydolgraph->SetData before calling mydolgrapgh->draw', LOG_WARNING);
|
||||||
$firstlot=0;
|
$firstlot=0;
|
||||||
// Works with line but not with bars
|
// Works with line but not with bars
|
||||||
|
|||||||
@ -3008,7 +3008,8 @@ class Form
|
|||||||
* @param int $productid Id of product
|
* @param int $productid Id of product
|
||||||
* @param string $htmlname Name of HTML field
|
* @param string $htmlname Name of HTML field
|
||||||
* @param int $selected_supplier Pre-selected supplier if more than 1 result
|
* @param int $selected_supplier Pre-selected supplier if more than 1 result
|
||||||
* @return void
|
*
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '')
|
public function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -291,7 +291,6 @@ class Translate
|
|||||||
//if ($key == 'Order') print "Domain=$domain, found a string for key=$key=$tab[0] with value $tab[1]. Currently in cache ".$this->tab_translate[$key]."<br>";
|
//if ($key == 'Order') print "Domain=$domain, found a string for key=$key=$tab[0] with value $tab[1]. Currently in cache ".$this->tab_translate[$key]."<br>";
|
||||||
if (empty($this->tab_translate[$key]))
|
if (empty($this->tab_translate[$key]))
|
||||||
{ // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries)
|
{ // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries)
|
||||||
$value = preg_replace('/\\n/', "\n", $value); // Parse and render carriage returns
|
|
||||||
if ($key == 'DIRECTION') { // This is to declare direction of language
|
if ($key == 'DIRECTION') { // This is to declare direction of language
|
||||||
if ($alt < 2 || empty($this->tab_translate[$key])) { // We load direction only for primary files or if not yet loaded
|
if ($alt < 2 || empty($this->tab_translate[$key])) { // We load direction only for primary files or if not yet loaded
|
||||||
$this->tab_translate[$key] = $value;
|
$this->tab_translate[$key] = $value;
|
||||||
@ -307,8 +306,8 @@ class Translate
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->tab_translate[$key] = $value;
|
// Convert some strings: Parse and render carriage returns. Also, change '\\s' int '\s' because transifex sync pull the string '\s' into string '\\s'
|
||||||
//if ($domain == 'orders') print "$tab[0] value $value<br>";
|
$this->tab_translate[$key] = str_replace(array('\\n', '\\\\s'), array("\n", '\s'), $value);
|
||||||
if ($usecachekey) {
|
if ($usecachekey) {
|
||||||
$tabtranslatedomain[$key] = $value;
|
$tabtranslatedomain[$key] = $value;
|
||||||
} // To save lang content in cache
|
} // To save lang content in cache
|
||||||
@ -491,9 +490,9 @@ class Translate
|
|||||||
//print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>";
|
//print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>";
|
||||||
if (empty($this->tab_translate[$key])) // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries)
|
if (empty($this->tab_translate[$key])) // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries)
|
||||||
{
|
{
|
||||||
$value=trim(preg_replace('/\\n/', "\n", $value));
|
// Convert some strings: Parse and render carriage returns. Also, change '\\s' int '\s' because transifex sync pull the string '\s' into string '\\s'
|
||||||
|
$this->tab_translate[$key] = str_replace(array('\\n', '\\\\s'), array("\n", '\s'), $value);
|
||||||
|
|
||||||
$this->tab_translate[$key]=$value;
|
|
||||||
if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache
|
if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,9 +617,8 @@ class Translate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! preg_match('/^Format/', $key))
|
if (strpos($key, 'Format') !== 0)
|
||||||
{
|
{
|
||||||
//print $str;
|
|
||||||
$str=sprintf($str, $param1, $param2, $param3, $param4); // Replace %s and %d except for FormatXXX strings.
|
$str=sprintf($str, $param1, $param2, $param3, $param4); // Replace %s and %d except for FormatXXX strings.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ class EmailCollector extends CommonObject
|
|||||||
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'),
|
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'),
|
||||||
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
|
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
|
||||||
//'actiontodo' => array('type'=>'varchar(255)', 'label'=>'ActionToDo', 'visible'=>1, 'enabled'=>1, 'position'=>106),
|
//'actiontodo' => array('type'=>'varchar(255)', 'label'=>'ActionToDo', 'visible'=>1, 'enabled'=>1, 'position'=>106),
|
||||||
'target_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxTargetDirectory', 'visible'=>1, 'enabled'=>1, 'position'=>110, 'notnull'=>0, 'comment'=>"Where to store messages once processed"),
|
'target_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxTargetDirectory', 'visible'=>1, 'enabled'=>1, 'position'=>110, 'notnull'=>0, 'help'=>"EmailCollectorTargetDir"),
|
||||||
'maxemailpercollect' => array('type'=>'integer', 'label'=>'MaxEmailCollectPerCollect', 'visible'=>-1, 'enabled'=>1, 'position'=>111, 'default'=>100),
|
'maxemailpercollect' => array('type'=>'integer', 'label'=>'MaxEmailCollectPerCollect', 'visible'=>-1, 'enabled'=>1, 'position'=>111, 'default'=>100),
|
||||||
'datelastresult' => array('type'=>'datetime', 'label'=>'DateLastCollectResult', 'visible'=>1, 'enabled'=>'$action != "create" && $action != "edit"', 'position'=>121, 'notnull'=>-1,),
|
'datelastresult' => array('type'=>'datetime', 'label'=>'DateLastCollectResult', 'visible'=>1, 'enabled'=>'$action != "create" && $action != "edit"', 'position'=>121, 'notnull'=>-1,),
|
||||||
'codelastresult' => array('type'=>'varchar(16)', 'label'=>'CodeLastResult', 'visible'=>1, 'enabled'=>'$action != "create" && $action != "edit"', 'position'=>122, 'notnull'=>-1,),
|
'codelastresult' => array('type'=>'varchar(16)', 'label'=>'CodeLastResult', 'visible'=>1, 'enabled'=>'$action != "create" && $action != "edit"', 'position'=>122, 'notnull'=>-1,),
|
||||||
|
|||||||
@ -73,7 +73,6 @@ AccountingCategory=Personalised groups
|
|||||||
GroupByAccountAccounting=Group by finance account
|
GroupByAccountAccounting=Group by finance account
|
||||||
AccountingAccountGroupsDesc=Here you can define some groups of financial accounts. They will be used for personalised accounting reports.
|
AccountingAccountGroupsDesc=Here you can define some groups of financial accounts. They will be used for personalised accounting reports.
|
||||||
ByPersonalizedAccountGroups=By personalised groups
|
ByPersonalizedAccountGroups=By personalised groups
|
||||||
ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger.
|
|
||||||
ConfirmDeleteMvtPartial=This will delete the transaction from the Ledger (all lines related to this transaction will be deleted)
|
ConfirmDeleteMvtPartial=This will delete the transaction from the Ledger (all lines related to this transaction will be deleted)
|
||||||
DescJournalOnlyBindedVisible=This is a view of records that are linked to a finance account and can be posted into the Ledger.
|
DescJournalOnlyBindedVisible=This is a view of records that are linked to a finance account and can be posted into the Ledger.
|
||||||
FeeAccountNotDefined=Account for fees not defined
|
FeeAccountNotDefined=Account for fees not defined
|
||||||
|
|||||||
@ -6,7 +6,6 @@ SupplierProposalShort=Vendor quote
|
|||||||
SupplierProposals=Vendor quotes
|
SupplierProposals=Vendor quotes
|
||||||
SupplierProposalsShort=Vendor quotes
|
SupplierProposalsShort=Vendor quotes
|
||||||
SupplierProposalRefFournNotice=Before closing as "Accepted", think of obtaining suppliers references.
|
SupplierProposalRefFournNotice=Before closing as "Accepted", think of obtaining suppliers references.
|
||||||
CopyAskFrom=Create a price request by copying an existing request
|
|
||||||
ConfirmReOpenAsk=Are you sure you want to reopen the price request <b>%s</b>?
|
ConfirmReOpenAsk=Are you sure you want to reopen the price request <b>%s</b>?
|
||||||
ActionsOnSupplierProposal=Actions on price request
|
ActionsOnSupplierProposal=Actions on price request
|
||||||
DocModelAuroreDescription=A complete request example (logo...)
|
DocModelAuroreDescription=A complete request example (logo...)
|
||||||
|
|||||||
@ -561,9 +561,9 @@ Module200Desc=LDAP directory synchronization
|
|||||||
Module210Name=PostNuke
|
Module210Name=PostNuke
|
||||||
Module210Desc=PostNuke integration
|
Module210Desc=PostNuke integration
|
||||||
Module240Name=Data exports
|
Module240Name=Data exports
|
||||||
Module240Desc=Tool to export Dolibarr data (with assistants)
|
Module240Desc=Tool to export Dolibarr data (with assistance)
|
||||||
Module250Name=Data imports
|
Module250Name=Data imports
|
||||||
Module250Desc=Tool to import data into Dolibarr (with assistants)
|
Module250Desc=Tool to import data into Dolibarr (with assistance)
|
||||||
Module310Name=Members
|
Module310Name=Members
|
||||||
Module310Desc=Foundation members management
|
Module310Desc=Foundation members management
|
||||||
Module320Name=RSS Feed
|
Module320Name=RSS Feed
|
||||||
@ -1763,7 +1763,7 @@ ListOfNotificationsPerUser=List of automatic notifications per user*
|
|||||||
ListOfNotificationsPerUserOrContact=List of possible automatic notifications (on business event) available per user* or per contact**
|
ListOfNotificationsPerUserOrContact=List of possible automatic notifications (on business event) available per user* or per contact**
|
||||||
ListOfFixedNotifications=List of automatic fixed notifications
|
ListOfFixedNotifications=List of automatic fixed notifications
|
||||||
GoOntoUserCardToAddMore=Go to the tab "Notifications" of a user to add or remove notifications for users
|
GoOntoUserCardToAddMore=Go to the tab "Notifications" of a user to add or remove notifications for users
|
||||||
GoOntoContactCardToAddMore=Go on the tab "Notifications" of a third party to add or remove notifications for contacts/addresses
|
GoOntoContactCardToAddMore=Go to the tab "Notifications" of a third party to add or remove notifications for contacts/addresses
|
||||||
Threshold=Threshold
|
Threshold=Threshold
|
||||||
BackupDumpWizard=Wizard to build the backup file
|
BackupDumpWizard=Wizard to build the backup file
|
||||||
SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason:
|
SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason:
|
||||||
@ -1954,6 +1954,8 @@ SmallerThan=Smaller than
|
|||||||
LargerThan=Larger than
|
LargerThan=Larger than
|
||||||
IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects.
|
IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects.
|
||||||
WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/.
|
WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/.
|
||||||
|
EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set a value here to use this feature. Note that you must also use a read/write login account.
|
||||||
|
EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\s([^\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body.
|
||||||
EndPointFor=End point for %s : %s
|
EndPointFor=End point for %s : %s
|
||||||
DeleteEmailCollector=Delete email collector
|
DeleteEmailCollector=Delete email collector
|
||||||
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
|
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
|
||||||
|
|||||||
@ -339,7 +339,7 @@ MyContacts=My contacts
|
|||||||
Capital=Capital
|
Capital=Capital
|
||||||
CapitalOf=Capital of %s
|
CapitalOf=Capital of %s
|
||||||
EditCompany=Edit company
|
EditCompany=Edit company
|
||||||
ThisUserIsNot=This user is not a prospect, customer nor vendor
|
ThisUserIsNot=This user is not a prospect, customer or vendor
|
||||||
VATIntraCheck=Check
|
VATIntraCheck=Check
|
||||||
VATIntraCheckDesc=The VAT ID must include the country prefix. The link <b>%s</b> uses the European VAT checker service (VIES) which requires internet access from the Dolibarr server.
|
VATIntraCheckDesc=The VAT ID must include the country prefix. The link <b>%s</b> uses the European VAT checker service (VIES) which requires internet access from the Dolibarr server.
|
||||||
VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do
|
VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do
|
||||||
|
|||||||
@ -201,23 +201,23 @@ unitM3=Cubic meter
|
|||||||
unitL=Liter
|
unitL=Liter
|
||||||
unitT=ton
|
unitT=ton
|
||||||
unitKG=kg
|
unitKG=kg
|
||||||
unitG=g
|
unitG=Gram
|
||||||
unitMG=mg
|
unitMG=mg
|
||||||
unitLB=pound
|
unitLB=pound
|
||||||
unitOZ=ounce
|
unitOZ=ounce
|
||||||
unitM=m
|
unitM=Meter
|
||||||
unitDM=dm
|
unitDM=dm
|
||||||
unitCM=cm
|
unitCM=cm
|
||||||
unitMM=mm
|
unitMM=mm
|
||||||
unitFT=ft
|
unitFT=ft
|
||||||
unitIN=in
|
unitIN=in
|
||||||
unitM2=m²
|
unitM2=Square meter
|
||||||
unitDM2=dm²
|
unitDM2=dm²
|
||||||
unitCM2=cm²
|
unitCM2=cm²
|
||||||
unitMM2=mm²
|
unitMM2=mm²
|
||||||
unitFT2=ft²
|
unitFT2=ft²
|
||||||
unitIN2=in²
|
unitIN2=in²
|
||||||
unitM3=m³
|
unitM3=Cubic meter
|
||||||
unitDM3=dm³
|
unitDM3=dm³
|
||||||
unitCM3=cm³
|
unitCM3=cm³
|
||||||
unitMM3=mm³
|
unitMM3=mm³
|
||||||
|
|||||||
@ -4,8 +4,8 @@ RefReception=Ref. reception
|
|||||||
Reception=Reception
|
Reception=Reception
|
||||||
Receptions=Receptions
|
Receptions=Receptions
|
||||||
AllReceptions=All Receptions
|
AllReceptions=All Receptions
|
||||||
Reception=Product reception
|
Reception=Reception
|
||||||
Receptions=Reception
|
Receptions=Receptions
|
||||||
ShowReception=Show Receptions
|
ShowReception=Show Receptions
|
||||||
ReceptionsArea=Receptions area
|
ReceptionsArea=Receptions area
|
||||||
ListOfReceptions=List of receptions
|
ListOfReceptions=List of receptions
|
||||||
|
|||||||
@ -32,7 +32,7 @@ SupplierProposalStatusValidatedShort=Validated
|
|||||||
SupplierProposalStatusClosedShort=Closed
|
SupplierProposalStatusClosedShort=Closed
|
||||||
SupplierProposalStatusSignedShort=Accepted
|
SupplierProposalStatusSignedShort=Accepted
|
||||||
SupplierProposalStatusNotSignedShort=Refused
|
SupplierProposalStatusNotSignedShort=Refused
|
||||||
CopyAskFrom=Create price request by copying existing a request
|
CopyAskFrom=Create a price request by copying an existing request
|
||||||
CreateEmptyAsk=Create blank request
|
CreateEmptyAsk=Create blank request
|
||||||
ConfirmCloneAsk=Are you sure you want to clone the price request <b>%s</b>?
|
ConfirmCloneAsk=Are you sure you want to clone the price request <b>%s</b>?
|
||||||
ConfirmReOpenAsk=Are you sure you want to open back the price request <b>%s</b>?
|
ConfirmReOpenAsk=Are you sure you want to open back the price request <b>%s</b>?
|
||||||
|
|||||||
@ -113,7 +113,7 @@ ReplaceString=New string
|
|||||||
CSSContentTooltipHelp=Enter here CSS content. To avoid any conflict with the CSS of the application, be sure to prepend all declaration with the .bodywebsite class. For example:<br><br>#mycssselector, input.myclass:hover { ... }<br>must be<br>.bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }<br><br>Note: If you have a large file without this prefix, you can use 'lessc' to convert it to append the .bodywebsite prefix everywhere.
|
CSSContentTooltipHelp=Enter here CSS content. To avoid any conflict with the CSS of the application, be sure to prepend all declaration with the .bodywebsite class. For example:<br><br>#mycssselector, input.myclass:hover { ... }<br>must be<br>.bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }<br><br>Note: If you have a large file without this prefix, you can use 'lessc' to convert it to append the .bodywebsite prefix everywhere.
|
||||||
LinkAndScriptsHereAreNotLoadedInEditor=Warning: This content is output only when site is accessed from a server. It is not used in Edit mode so if you need to load javascript files also in edit mode, just add your tag 'script src=...' into the page.
|
LinkAndScriptsHereAreNotLoadedInEditor=Warning: This content is output only when site is accessed from a server. It is not used in Edit mode so if you need to load javascript files also in edit mode, just add your tag 'script src=...' into the page.
|
||||||
Dynamiccontent=Sample of a page with dynamic content
|
Dynamiccontent=Sample of a page with dynamic content
|
||||||
ImportSite=Import site
|
ImportSite=Import website
|
||||||
EditInLineOnOff=Mode 'Edit inline' is %s
|
EditInLineOnOff=Mode 'Edit inline' is %s
|
||||||
ShowSubContainersOnOff=Mode to execute 'dynamic content' is %s
|
ShowSubContainersOnOff=Mode to execute 'dynamic content' is %s
|
||||||
GlobalCSSorJS=Global CSS/JS/Header file of web site
|
GlobalCSSorJS=Global CSS/JS/Header file of web site
|
||||||
|
|||||||
@ -139,7 +139,6 @@ AccountingAccountGroupsDesc=Puede definir aquí algunos grupos de cuentas contab
|
|||||||
DeleteMvt=Eliminar líneas de libro mayor
|
DeleteMvt=Eliminar líneas de libro mayor
|
||||||
DelYear=Año para borrar
|
DelYear=Año para borrar
|
||||||
DelJournal=Diario para eliminar
|
DelJournal=Diario para eliminar
|
||||||
ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger.
|
|
||||||
FinanceJournal=Diario de finanzas
|
FinanceJournal=Diario de finanzas
|
||||||
ExpenseReportsJournal=Diario de informes de gastos
|
ExpenseReportsJournal=Diario de informes de gastos
|
||||||
DescFinanceJournal=Diario financiero que incluye todos los tipos de pagos por cuenta bancaria
|
DescFinanceJournal=Diario financiero que incluye todos los tipos de pagos por cuenta bancaria
|
||||||
|
|||||||
@ -39,7 +39,6 @@ LabelAccount=Descripción de la cuenta
|
|||||||
Sens=Significado
|
Sens=Significado
|
||||||
DelYear=Año a borrar
|
DelYear=Año a borrar
|
||||||
DelJournal=Diario a borrar
|
DelJournal=Diario a borrar
|
||||||
ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger.
|
|
||||||
DescFinanceJournal=Diario financiero incluyendo todos los tipos de pagos por cuenta bancaria
|
DescFinanceJournal=Diario financiero incluyendo todos los tipos de pagos por cuenta bancaria
|
||||||
CustomerInvoicePayment=Pago de factura de cliente
|
CustomerInvoicePayment=Pago de factura de cliente
|
||||||
NewAccountingMvt=Nueva transacción
|
NewAccountingMvt=Nueva transacción
|
||||||
|
|||||||
@ -41,6 +41,5 @@ ACCOUNTING_SOCIAL_JOURNAL=Diario Social
|
|||||||
ACCOUNTING_ACCOUNT_SUSPENSE=Cuenta contable de espera
|
ACCOUNTING_ACCOUNT_SUSPENSE=Cuenta contable de espera
|
||||||
Sens=Significado
|
Sens=Significado
|
||||||
Codejournal=Periódico
|
Codejournal=Periódico
|
||||||
ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger.
|
|
||||||
FinanceJournal=Periodo Financiero
|
FinanceJournal=Periodo Financiero
|
||||||
TotalMarge=Margen total de ventas
|
TotalMarge=Margen total de ventas
|
||||||
|
|||||||
@ -3,7 +3,6 @@ ConfigAccountingExpert=Configuration du module de compta expert
|
|||||||
Processing=Exécution
|
Processing=Exécution
|
||||||
Lineofinvoice=Lignes de facture
|
Lineofinvoice=Lignes de facture
|
||||||
Doctype=Type de document
|
Doctype=Type de document
|
||||||
ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger.
|
|
||||||
ErrorDebitCredit=Débit et crédit ne peuvent pas être non-nuls en même temps
|
ErrorDebitCredit=Débit et crédit ne peuvent pas être non-nuls en même temps
|
||||||
TotalMarge=Marge de ventes totale
|
TotalMarge=Marge de ventes totale
|
||||||
Selectmodelcsv=Sélectionnez un modèle d'export
|
Selectmodelcsv=Sélectionnez un modèle d'export
|
||||||
|
|||||||
@ -107,7 +107,6 @@ ACCOUNTING_SERVICE_SOLD_ACCOUNT=Compte comptable par défaut pour les services v
|
|||||||
GroupByAccountAccounting=Groupe par compte comptable
|
GroupByAccountAccounting=Groupe par compte comptable
|
||||||
NotMatch=Pas encore défini
|
NotMatch=Pas encore défini
|
||||||
DeleteMvt=Effacer les lignes du grand livre
|
DeleteMvt=Effacer les lignes du grand livre
|
||||||
ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger.
|
|
||||||
FinanceJournal=Journal des finances
|
FinanceJournal=Journal des finances
|
||||||
ExpenseReportsJournal=Journal des rapports de dépenses
|
ExpenseReportsJournal=Journal des rapports de dépenses
|
||||||
DescFinanceJournal=Journal de banque comprenant tous les types de règlements autres que espèce\t
|
DescFinanceJournal=Journal de banque comprenant tous les types de règlements autres que espèce\t
|
||||||
|
|||||||
@ -23,7 +23,6 @@ EndProcessing=Verwerking beëindigd
|
|||||||
Lineofinvoice=Factuur lijn
|
Lineofinvoice=Factuur lijn
|
||||||
Docdate=Datum
|
Docdate=Datum
|
||||||
Docref=Artikelcode
|
Docref=Artikelcode
|
||||||
ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger.
|
|
||||||
TotalVente=Totaal omzet voor belastingen
|
TotalVente=Totaal omzet voor belastingen
|
||||||
AccountingJournalType2=Verkoop
|
AccountingJournalType2=Verkoop
|
||||||
AccountingJournalType3=Inkoop
|
AccountingJournalType3=Inkoop
|
||||||
|
|||||||
@ -425,18 +425,6 @@ if ($id > 0)
|
|||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans("Loan"), -1, 'bill');
|
dol_fiche_head($head, 'card', $langs->trans("Loan"), -1, 'bill');
|
||||||
|
|
||||||
print '<script type="text/javascript">'."\n";
|
|
||||||
print ' function popEcheancier() {'."\n";
|
|
||||||
print ' $div = $(\'<div id="popCalendar"><iframe width="100%" height="98%" frameborder="0" src="createschedule.php?loanid='.$object->id.'"></iframe></div>\');'."\n";
|
|
||||||
print ' $div.dialog({'."\n";
|
|
||||||
print ' modal:true'."\n";
|
|
||||||
print ' ,width:"90%"'."\n";
|
|
||||||
print ' ,height:$(window).height() - 160'."\n";
|
|
||||||
print ' });'."\n";
|
|
||||||
print ' }'."\n";
|
|
||||||
print '</script>';
|
|
||||||
|
|
||||||
|
|
||||||
// Loan card
|
// Loan card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
@ -792,8 +780,6 @@ if ($id > 0)
|
|||||||
// Edit
|
// Edit
|
||||||
if ($object->paid == 0 && $user->rights->loan->write)
|
if ($object->paid == 0 && $user->rights->loan->write)
|
||||||
{
|
{
|
||||||
// print '<a href="javascript:popEcheancier()" class="butAction">'.$langs->trans('CreateCalcSchedule').'</a>';
|
|
||||||
|
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/card.php?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,228 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2017 Franck Moreau <franck.moreau@theobald.com>
|
|
||||||
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.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/loan/createschedule.php
|
|
||||||
* \ingroup loan
|
|
||||||
* \brief Schedule card
|
|
||||||
*/
|
|
||||||
|
|
||||||
require '../main.inc.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php';
|
|
||||||
|
|
||||||
$loanid = GETPOST('loanid', 'int');
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
|
||||||
|
|
||||||
$object = new Loan($db);
|
|
||||||
$object->fetch($loanid);
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array("compta", "bills", "loan"));
|
|
||||||
|
|
||||||
if ($action == 'createecheancier') {
|
|
||||||
$i = 1;
|
|
||||||
while ($i < $object->nbterm + 1) {
|
|
||||||
$date = GETPOST('hi_date'.$i, 'int');
|
|
||||||
$mens = GETPOST('mens'.$i);
|
|
||||||
$int = GETPOST('hi_interets'.$i);
|
|
||||||
$insurance = GETPOST('hi_insurance'.$i);
|
|
||||||
|
|
||||||
$echeance = new LoanSchedule($db);
|
|
||||||
|
|
||||||
$echeance->fk_loan = $object->id;
|
|
||||||
$echeance->datec = dol_now();
|
|
||||||
$echeance->tms = dol_now();
|
|
||||||
$echeance->datep = $date;
|
|
||||||
$echeance->amount_capital = $mens - $int;
|
|
||||||
$echeance->amount_insurance = $insurance;
|
|
||||||
$echeance->amount_interest = $int;
|
|
||||||
$echeance->fk_typepayment = 3;
|
|
||||||
$echeance->fk_bank = 0;
|
|
||||||
$echeance->fk_user_creat = $user->id;
|
|
||||||
$echeance->fk_user_modif = $user->id;
|
|
||||||
$result = $echeance->create($user);
|
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages($echeance->error, $echeance->errors, 'errors');
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'updateecheancier') {
|
|
||||||
$i = 1;
|
|
||||||
while ($i < $object->nbterm + 1) {
|
|
||||||
$mens = GETPOST('mens'.$i);
|
|
||||||
$int = GETPOST('hi_interets'.$i);
|
|
||||||
$id = GETPOST('hi_rowid'.$i);
|
|
||||||
$insurance = GETPOST('hi_insurance'.$i);
|
|
||||||
|
|
||||||
$echeance = new LoanSchedule($db);
|
|
||||||
$echeance->fetch($id);
|
|
||||||
$echeance->tms = dol_now();
|
|
||||||
$echeance->amount_capital = $mens - $int;
|
|
||||||
$echeance->amount_insurance = $insurance;
|
|
||||||
$echeance->amount_interest = $int;
|
|
||||||
$echeance->fk_user_modif = $user->id;
|
|
||||||
$result = $echeance->update($user, 0);
|
|
||||||
if ($result < 0) {
|
|
||||||
setEventMessages(null, $echeance->errors, 'errors');
|
|
||||||
}
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$echeance = new LoanSchedule($db);
|
|
||||||
$echeance->fetchAll($object->id);
|
|
||||||
|
|
||||||
top_htmlhead('', '');
|
|
||||||
$var = !$var;
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('[name^="mens"]').focusout(function() {
|
|
||||||
var echeance=$(this).attr('ech');
|
|
||||||
var mens=$(this).val();
|
|
||||||
var idcap=echeance-1;
|
|
||||||
idcap = '#hi_capital'+idcap;
|
|
||||||
var capital=$(idcap).val();
|
|
||||||
console.log("Change montly amount echeance="+echeance+" idcap="+idcap+" capital="+capital);
|
|
||||||
$.ajax({
|
|
||||||
dataType: 'json',
|
|
||||||
url: 'calcmens.php',
|
|
||||||
data: { echeance: echeance, mens: mens, capital:capital, rate:<?php echo $object->rate / 100; ?> , nbterm : <?php echo $object->nbterm; ?>},
|
|
||||||
success: function(data) {
|
|
||||||
$.each(data, function(index, element) {
|
|
||||||
var idcap_res='#hi_capital'+index;
|
|
||||||
var idcap_res_srt='#capital'+index;
|
|
||||||
var interet_res='#hi_interets'+index;
|
|
||||||
var interet_res_str='#interets'+index;
|
|
||||||
var men_res='#mens'+index;
|
|
||||||
$(idcap_res).val(element.cap_rest);
|
|
||||||
$(idcap_res_srt).text(element.cap_rest_str+' €');
|
|
||||||
$(interet_res).val(element.interet);
|
|
||||||
$(interet_res_str).text(element.interet_str+' €');
|
|
||||||
$(men_res).val(element.mens);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
print '<form name="createecheancier" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
|
||||||
print '<input type="hidden" name="loanid" value="'.$loanid.'">';
|
|
||||||
if (count($echeance->lines) > 0)
|
|
||||||
{
|
|
||||||
print '<input type="hidden" name="action" value="updateecheancier">';
|
|
||||||
} else {
|
|
||||||
print '<input type="hidden" name="action" value="createecheancier">';
|
|
||||||
}
|
|
||||||
print '<table class="border centpercent">';
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
$colspan = 6;
|
|
||||||
if (count($echeance->lines) > 0) $colspan++;
|
|
||||||
print '<th class="center" colspan="'.$colspan.'">';
|
|
||||||
print $langs->trans("FinancialCommitment");
|
|
||||||
print '</th>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
|
||||||
print '<th width="5%" class="center">'.$langs->trans("Term").'</th>';
|
|
||||||
print '<th width="5%" class="center">'.$langs->trans("Date").'</th>';
|
|
||||||
print '<th width="15%" class="center">'.$langs->trans("Insurance");
|
|
||||||
print '<th width="15%" class="center">'.$langs->trans("InterestAmount").'</th>';
|
|
||||||
print '<th width="10%" class="center">'.$langs->trans("Amount").'</th>';
|
|
||||||
print '<th width="40%" class="center">'.$langs->trans("CapitalRemain");
|
|
||||||
print ' ('.price2num($object->capital).')';
|
|
||||||
print '<input type="hidden" name="hi_capital0" id ="hi_capital0" value="'.$object->capital.'">';
|
|
||||||
print '</th>';
|
|
||||||
if (count($echeance->lines) > 0) print '<th>'.$langs->trans('DoPayment').'</th>';
|
|
||||||
print '</tr>'."\n";
|
|
||||||
|
|
||||||
if ($object->nbterm > 0 && count($echeance->lines) == 0)
|
|
||||||
{
|
|
||||||
$i = 1;
|
|
||||||
$capital = $object->capital;
|
|
||||||
$insurance = $object->insurance_amount / $object->nbterm;
|
|
||||||
$insurance = price2num($insurance, 'MT');
|
|
||||||
$regulInsurance = price2num($object->insurance_amount - ($insurance * $object->nbterm));
|
|
||||||
while ($i < $object->nbterm + 1)
|
|
||||||
{
|
|
||||||
$mens = price2num($echeance->calcMonthlyPayments($capital, $object->rate / 100, $object->nbterm - $i + 1), 'MT');
|
|
||||||
$int = ($capital * ($object->rate / 12)) / 100;
|
|
||||||
$int = price2num($int, 'MT');
|
|
||||||
$cap_rest = price2num($capital - ($mens - $int), 'MT');
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="center" id="n'.$i.'">'.$i.'</td>';
|
|
||||||
print '<td class="center" id ="date'.$i.'"><input type="hidden" name="hi_date'.$i.'" id ="hi_date'.$i.'" value="'.dol_time_plus_duree($object->datestart, $i - 1, 'm').'">'.dol_print_date(dol_time_plus_duree($object->datestart, $i - 1, 'm'), 'day').'</td>';
|
|
||||||
print '<td class="center" id="insurance'.$i.'">'.price($insurance + (($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance'.$i.'" id ="hi_insurance'.$i.'" value="'.($insurance + (($i == 1) ? $regulInsurance : 0)).'">';
|
|
||||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets'.$i.'" id ="hi_interets'.$i.'" value="'.$int.'">';
|
|
||||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
|
||||||
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital'.$i.'" id ="hi_capital'.$i.'" value="'.$cap_rest.'">';
|
|
||||||
print '</tr>'."\n";
|
|
||||||
$i++;
|
|
||||||
$capital = $cap_rest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
elseif (count($echeance->lines) > 0)
|
|
||||||
{
|
|
||||||
$i = 1;
|
|
||||||
$capital = $object->capital;
|
|
||||||
$insurance = $object->insurance_amount / $object->nbterm;
|
|
||||||
$insurance = price2num($insurance, 'MT');
|
|
||||||
$regulInsurance = price2num($object->insurance_amount - ($insurance * $object->nbterm));
|
|
||||||
foreach ($echeance->lines as $line) {
|
|
||||||
$mens = $line->amount_capital + $line->amount_insurance + $line->amount_interest;
|
|
||||||
$int = $line->amount_interest;
|
|
||||||
$cap_rest = price2num($capital - ($mens - $int), 'MT');
|
|
||||||
print '<tr>';
|
|
||||||
print '<td class="center" id="n'.$i.'"><input type="hidden" name="hi_rowid'.$i.'" id ="hi_rowid'.$i.'" value="'.$line->id.'">'.$i.'</td>';
|
|
||||||
print '<td class="center" id ="date'.$i.'"><input type="hidden" name="hi_date'.$i.'" id ="hi_date'.$i.'" value="'.$line->datep.'">'.dol_print_date($line->datep, 'day').'</td>';
|
|
||||||
print '<td class="center" id="insurance'.$i.'">'.price($insurance + (($i == 1) ? $regulInsurance : 0), 0, '', 1).' €</td><input type="hidden" name="hi_insurance'.$i.'" id ="hi_insurance'.$i.'" value="'.($insurance + (($i == 1) ? $regulInsurance : 0)).'">';
|
|
||||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1).' €</td><input type="hidden" name="hi_interets'.$i.'" id ="hi_interets'.$i.'" value="'.$int.'">';
|
|
||||||
if ($line->datep > dol_now()) {
|
|
||||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
|
||||||
} else {
|
|
||||||
print '<td class="center">'.price($mens).' €</td><input type="hidden" name="mens'.$i.'" id ="mens'.$i.'" value="'.$mens.'">';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital'.$i.'" id ="hi_capital'.$i.'" value="'.$cap_rest.'">';
|
|
||||||
print '<td class="center"><a class="butAction" href="'.DOL_URL_ROOT.'/loan/payment/payment.php?id='.$object->id.'&action=create">'.$langs->trans('DoPayment').'</a></td>';
|
|
||||||
print '</tr>'."\n";
|
|
||||||
$i++;
|
|
||||||
$capital = $cap_rest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
print '</br>';
|
|
||||||
print '</br>';
|
|
||||||
print '<div class="center"><input class="button" type="submit" value="'.$langs->trans("Save").'"></div>';
|
|
||||||
print '</form>';
|
|
||||||
|
|
||||||
// End of page
|
|
||||||
llxFooter();
|
|
||||||
$db->close();
|
|
||||||
@ -36,13 +36,18 @@ if ($user->socid) $socid=$user->socid;
|
|||||||
$result = restrictedArea($user, 'loan', '', '', '');
|
$result = restrictedArea($user, 'loan', '', '', '');
|
||||||
|
|
||||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit;
|
||||||
$sortfield = GETPOST("sortfield", 'alpha');
|
$sortfield = GETPOST('sortfield', 'alpha');
|
||||||
$sortorder = GETPOST("sortorder", 'alpha');
|
$sortorder = GETPOST('sortorder', 'alpha');
|
||||||
$page = GETPOST("page", 'int');
|
$page = GETPOST('page', 'int');
|
||||||
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
|
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
// Initialize technical objects
|
||||||
|
$loan_static = new Loan($db);
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
if (!$sortfield) $sortfield = "l.rowid";
|
if (!$sortfield) $sortfield = "l.rowid";
|
||||||
if (!$sortorder) $sortorder = "DESC";
|
if (!$sortorder) $sortorder = "DESC";
|
||||||
|
|
||||||
@ -53,12 +58,27 @@ $search_amount = GETPOST('search_amount', 'alpha');
|
|||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
|
|
||||||
// Purge search criteria
|
|
||||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; }
|
||||||
|
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; }
|
||||||
|
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
|
// Purge search criteria
|
||||||
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||||
|
{
|
||||||
$search_ref = "";
|
$search_ref = "";
|
||||||
$search_label = "";
|
$search_label = "";
|
||||||
$search_amount = "";
|
$search_amount = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -66,9 +86,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$loan_static = new Loan($db);
|
$now = dol_now();
|
||||||
|
|
||||||
llxHeader();
|
//$help_url="EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject";
|
||||||
|
$help_url = '';
|
||||||
|
$title = $langs->trans('Loans');
|
||||||
|
|
||||||
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.paid,";
|
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.paid,";
|
||||||
$sql .= " SUM(pl.amount_capital) as alreadypayed";
|
$sql .= " SUM(pl.amount_capital) as alreadypayed";
|
||||||
@ -81,25 +103,45 @@ if ($search_label) $sql .= natural_search("l.label", $search_label);
|
|||||||
$sql .= " GROUP BY l.rowid, l.label, l.capital, l.paid, l.datestart, l.dateend";
|
$sql .= " GROUP BY l.rowid, l.label, l.capital, l.paid, l.datestart, l.dateend";
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
|
|
||||||
|
// Count total nb of records
|
||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||||
{
|
{
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
$nbtotalofrecords = $db->num_rows($result);
|
$nbtotalofrecords = $db->num_rows($resql);
|
||||||
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0
|
||||||
{
|
{
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= $db->plimit($limit+1, $offset);
|
// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set.
|
||||||
|
if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit)))
|
||||||
|
{
|
||||||
|
$num = $nbtotalofrecords;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($limit) $sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if (!$resql)
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Output page
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
|
llxHeader('', $title, $help_url);
|
||||||
|
|
||||||
//print $sql;
|
|
||||||
$resql=$db->query($sql);
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
@ -116,13 +158,15 @@ if ($resql)
|
|||||||
$newcardbutton.= dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/loan/card.php?action=create');
|
$newcardbutton.= dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/loan/card.php?action=create');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
print_barre_liste($langs->trans("Loans"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, $newcardbutton, '', $limit);
|
||||||
@ -146,6 +190,8 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Fields title label
|
||||||
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "l.rowid", "", $param, "", $sortfield, $sortorder);
|
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "l.rowid", "", $param, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "l.label", "", $param, '', $sortfield, $sortorder, 'left ');
|
||||||
@ -156,9 +202,15 @@ if ($resql)
|
|||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Loop on record
|
||||||
|
// --------------------------------------------------------------------
|
||||||
|
$i = 0;
|
||||||
|
$totalarray = array();
|
||||||
while ($i < ($limit ? min($num, $limit) : $num))
|
while ($i < ($limit ? min($num, $limit) : $num))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
if (empty($obj)) break; // Should not happen
|
||||||
|
|
||||||
$loan_static->id = $obj->rowid;
|
$loan_static->id = $obj->rowid;
|
||||||
$loan_static->ref = $obj->rowid;
|
$loan_static->ref = $obj->rowid;
|
||||||
$loan_static->label = $obj->label;
|
$loan_static->label = $obj->label;
|
||||||
@ -166,19 +218,19 @@ if ($resql)
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<td>'.$loan_static->getNomUrl(1, 42).'</td>';
|
print '<td>'.$loan_static->getNomUrl(1).'</td>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.dol_trunc($obj->label, 42).'</td>';
|
print '<td>'.dol_trunc($obj->label, 42).'</td>';
|
||||||
|
|
||||||
// Capital
|
// Capital
|
||||||
print '<td class="right" width="100">'.price($obj->capital).'</td>';
|
print '<td class="right maxwidth100">'.price($obj->capital).'</td>';
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
print '<td width="110" class="center">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
print '<td class="center width100">'.dol_print_date($db->jdate($obj->datestart), 'day').'</td>';
|
||||||
|
|
||||||
// Date end
|
// Date end
|
||||||
print '<td width="110" class="center">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
|
print '<td class="center width100">'.dol_print_date($db->jdate($obj->dateend), 'day').'</td>';
|
||||||
|
|
||||||
print '<td class="right nowrap">'.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).'</a></td>';
|
print '<td class="right nowrap">'.$loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed).'</a></td>';
|
||||||
|
|
||||||
@ -197,9 +249,15 @@ if ($resql)
|
|||||||
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||||
print '</div>';
|
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
print "</form>\n";
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
|
print '</table>'."\n";
|
||||||
|
print '</div>'."\n";
|
||||||
|
|
||||||
|
print '</form>'."\n";
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/loan/createschedule.php
|
* \file htdocs/loan/schedule.php
|
||||||
* \ingroup loan
|
* \ingroup loan
|
||||||
* \brief Schedule card
|
* \brief Schedule card
|
||||||
*/
|
*/
|
||||||
@ -229,10 +229,10 @@ if ($object->nbterm > 0 && count($echeance->lines) == 0)
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="center" id="n'.$i.'">'.$i.'</td>';
|
print '<td class="center" id="n'.$i.'">'.$i.'</td>';
|
||||||
print '<td class="center" id ="date'.$i.'"><input type="hidden" name="hi_date'.$i.'" id ="hi_date'.$i.'" value="'.dol_time_plus_duree($object->datestart, $i - 1, 'm').'">'.dol_print_date(dol_time_plus_duree($object->datestart, $i - 1, 'm'), 'day').'</td>';
|
print '<td class="center" id ="date'.$i.'"><input type="hidden" name="hi_date'.$i.'" id ="hi_date'.$i.'" value="'.dol_time_plus_duree($object->datestart, $i - 1, 'm').'">'.dol_print_date(dol_time_plus_duree($object->datestart, $i - 1, 'm'), 'day').'</td>';
|
||||||
print '<td class="center" id="insurance'.$i.'">'.price($insurance + (($i == 1) ? $regulInsurance : 0), 0, '', 1, -1, -1, $conf->currency).' €</td><input type="hidden" name="hi_insurance'.$i.'" id ="hi_insurance'.$i.'" value="'.($insurance + (($i == 1) ? $regulInsurance : 0)).'">';
|
print '<td class="center" id="insurance'.$i.'">'.price($insurance + (($i == 1) ? $regulInsurance : 0), 0, '', 1, -1, -1, $conf->currency).'</td><input type="hidden" name="hi_insurance'.$i.'" id ="hi_insurance'.$i.'" value="'.($insurance + (($i == 1) ? $regulInsurance : 0)).'">';
|
||||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1, -1, -1, $conf->currency).' €</td><input type="hidden" name="hi_interets'.$i.'" id ="hi_interets'.$i.'" value="'.$int.'">';
|
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1, -1, -1, $conf->currency).'</td><input type="hidden" name="hi_interets'.$i.'" id ="hi_interets'.$i.'" value="'.$int.'">';
|
||||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"></td>';
|
||||||
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).' €</td><input type="hidden" name="hi_capital'.$i.'" id ="hi_capital'.$i.'" value="'.$cap_rest.'">';
|
print '<td class="center" id="capital'.$i.'">'.price($cap_rest).'</td><input type="hidden" name="hi_capital'.$i.'" id ="hi_capital'.$i.'" value="'.$cap_rest.'">';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
$i++;
|
$i++;
|
||||||
$capital = $cap_rest;
|
$capital = $cap_rest;
|
||||||
@ -255,10 +255,10 @@ elseif (count($echeance->lines) > 0)
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="center" id="n'.$i.'"><input type="hidden" name="hi_rowid'.$i.'" id ="hi_rowid'.$i.'" value="'.$line->id.'">'.$i.'</td>';
|
print '<td class="center" id="n'.$i.'"><input type="hidden" name="hi_rowid'.$i.'" id ="hi_rowid'.$i.'" value="'.$line->id.'">'.$i.'</td>';
|
||||||
print '<td class="center" id ="date'.$i.'"><input type="hidden" name="hi_date'.$i.'" id ="hi_date'.$i.'" value="'.$line->datep.'">'.dol_print_date($line->datep, 'day').'</td>';
|
print '<td class="center" id ="date'.$i.'"><input type="hidden" name="hi_date'.$i.'" id ="hi_date'.$i.'" value="'.$line->datep.'">'.dol_print_date($line->datep, 'day').'</td>';
|
||||||
print '<td class="center" id="insurance'.$i.'">'.price($insu, 0, '', 1, -1, -1, $conf->currency).' €</td><input type="hidden" name="hi_insurance'.$i.'" id ="hi_insurance'.$i.'" value="'.$insu.'">';
|
print '<td class="center" id="insurance'.$i.'">'.price($insu, 0, '', 1, -1, -1, $conf->currency).'</td><input type="hidden" name="hi_insurance'.$i.'" id ="hi_insurance'.$i.'" value="'.$insu.'">';
|
||||||
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1, -1, -1, $conf->currency).' €</td><input type="hidden" name="hi_interets'.$i.'" id ="hi_interets'.$i.'" value="'.$int.'">';
|
print '<td class="center" id="interets'.$i.'">'.price($int, 0, '', 1, -1, -1, $conf->currency).'</td><input type="hidden" name="hi_interets'.$i.'" id ="hi_interets'.$i.'" value="'.$int.'">';
|
||||||
if ($line->datep > dol_now() && empty($line->fk_bank)) {
|
if ($line->datep > dol_now() && empty($line->fk_bank)) {
|
||||||
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"> €</td>';
|
print '<td class="center"><input name="mens'.$i.'" id="mens'.$i.'" size="5" value="'.$mens.'" ech="'.$i.'"></td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="center">'.price($mens, 0, '', 1, -1, -1, $conf->currency).'</td><input type="hidden" name="mens'.$i.'" id ="mens'.$i.'" value="'.$mens.'">';
|
print '<td class="center">'.price($mens, 0, '', 1, -1, -1, $conf->currency).'</td><input type="hidden" name="mens'.$i.'" id ="mens'.$i.'" value="'.$mens.'">';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -360,7 +360,7 @@ if ($permissiontodelete) $arrayofmassactions['predelete'] = '<span class="fa fa-
|
|||||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
|
|||||||
@ -50,6 +50,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||||
dol_include_once('/mrp/class/mo.class.php');
|
dol_include_once('/mrp/class/mo.class.php');
|
||||||
dol_include_once('/mrp/lib/mrp_mo.lib.php');
|
dol_include_once('/mrp/lib/mrp_mo.lib.php');
|
||||||
@ -371,10 +372,10 @@ if (empty($reshook))
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
|
||||||
$formproject = new FormProjets($db);
|
$formproject = new FormProjets($db);
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
$tmpwarehouse = new Entrepot($db);
|
$tmpwarehouse = new Entrepot($db);
|
||||||
|
$tmpbatch = new Productlot($db);
|
||||||
|
|
||||||
llxHeader('', $langs->trans('Mo'), '');
|
llxHeader('', $langs->trans('Mo'), '');
|
||||||
|
|
||||||
@ -606,7 +607,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print load_fiche_titre($langs->trans('Consumption'), '', '');
|
print load_fiche_titre($langs->trans('Consumption'), '', '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print '<table id="tablelines" class="noborder noshadow nobottom centpercent">';
|
print '<table id="tablelines" class="noborder noshadow centpercent'.' nobottom'.'">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Product").'</td>';
|
print '<td>'.$langs->trans("Product").'</td>';
|
||||||
@ -664,7 +665,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
jQuery("#expandtoproduce'.$line->id.'").click(function() {
|
jQuery("#expandtoproduce'.$line->id.'").click(function() {
|
||||||
console.log("Expand mrp_production line '.$line->id.'");
|
console.log("Expand mrp_production line '.$line->id.'");
|
||||||
jQuery(".expanddetail'.$line->id.'").toggle();';
|
jQuery(".expanddetail'.$line->id.'").toggle();';
|
||||||
if ($nblinetoconsume == $nblinetoconsumecursor) {
|
if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line
|
||||||
print 'if (jQuery("#tablelines").hasClass("nobottom")) { jQuery("#tablelines").removeClass("nobottom"); } else { jQuery("#tablelines").addClass("nobottom"); }';
|
print 'if (jQuery("#tablelines").hasClass("nobottom")) { jQuery("#tablelines").removeClass("nobottom"); } else { jQuery("#tablelines").addClass("nobottom"); }';
|
||||||
}
|
}
|
||||||
print '
|
print '
|
||||||
@ -674,6 +675,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if (empty($conf->use_javascript_ajax)) print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">';
|
if (empty($conf->use_javascript_ajax)) print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">';
|
||||||
print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"');
|
print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"');
|
||||||
if (empty($conf->use_javascript_ajax)) print '</a>';
|
if (empty($conf->use_javascript_ajax)) print '</a>';
|
||||||
|
} else {
|
||||||
|
if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line
|
||||||
|
print '<script>jQuery("#tablelines").removeClass("nobottom");</script>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print ' '.$alreadyconsumed;
|
print ' '.$alreadyconsumed;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -695,10 +700,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if ($line2['fk_warehouse'] > 0) {
|
if ($line2['fk_warehouse'] > 0) {
|
||||||
$tmpwarehouse->fetch($line2['fk_warehouse']);
|
$tmpwarehouse->fetch($line2['fk_warehouse']);
|
||||||
print $tmpwarehouse->getNomUrl();
|
print $tmpwarehouse->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
// Lot Batch
|
||||||
|
print '<td>';
|
||||||
|
if ($line2['batch'] != '') {
|
||||||
|
$tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
|
||||||
|
print $tmpbatch->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$line2['batch'].'</td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -721,6 +732,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("NoStockChangeOnServices").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("NoStockChangeOnServices").'</span>';
|
||||||
}
|
}
|
||||||
|
// Lot / Batch
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($conf->productbatch->enabled) {
|
if ($conf->productbatch->enabled) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -826,10 +838,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if ($line2['fk_warehouse'] > 0) {
|
if ($line2['fk_warehouse'] > 0) {
|
||||||
$tmpwarehouse->fetch($line2['fk_warehouse']);
|
$tmpwarehouse->fetch($line2['fk_warehouse']);
|
||||||
print $tmpwarehouse->getNomUrl();
|
print $tmpwarehouse->getNomUrl(1);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '<td>';
|
||||||
|
if ($line2['batch'] != '') {
|
||||||
|
$tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
|
||||||
|
print $tmpbatch->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$line2['batch'].'</td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -220,7 +220,7 @@ class Productlot extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load object in memory from the database
|
* Load object in memory from the database
|
||||||
*
|
*
|
||||||
* @param int $id Id object
|
* @param int $id Id of lot/batch
|
||||||
* @param int $product_id Id of product, batch number parameter required
|
* @param int $product_id Id of product, batch number parameter required
|
||||||
* @param string $batch batch number
|
* @param string $batch batch number
|
||||||
*
|
*
|
||||||
|
|||||||
@ -336,17 +336,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
// Eat by
|
// Eat by
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Sell by
|
// Sell by
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->editfieldkey($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $form->editfieldval($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -724,7 +724,7 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
|||||||
|
|
||||||
// Supplier
|
// Supplier
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
$form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier);
|
print $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
|
|||||||
@ -421,10 +421,10 @@ class WebsitePage extends CommonObject
|
|||||||
* @param string $newlang New language
|
* @param string $newlang New language
|
||||||
* @param int $istranslation 1=New page is a translation of the cloned page.
|
* @param int $istranslation 1=New page is a translation of the cloned page.
|
||||||
* @param int $newwebsite 0=Same web site, >0=Id of new website
|
* @param int $newwebsite 0=Same web site, >0=Id of new website
|
||||||
* @param int $keeptitleunchanged 1=Keep title unchanged
|
* @param string $newtitle New title
|
||||||
* @return mixed New object created, <0 if KO
|
* @return mixed New object created, <0 if KO
|
||||||
*/
|
*/
|
||||||
public function createFromClone(User $user, $fromid, $newref, $newlang = '', $istranslation = 0, $newwebsite = 0, $keeptitleunchanged = 0)
|
public function createFromClone(User $user, $fromid, $newref, $newlang = '', $istranslation = 0, $newwebsite = 0, $newtitle = '')
|
||||||
{
|
{
|
||||||
global $hookmanager, $langs;
|
global $hookmanager, $langs;
|
||||||
|
|
||||||
@ -435,6 +435,18 @@ class WebsitePage extends CommonObject
|
|||||||
|
|
||||||
$object = new self($this->db);
|
$object = new self($this->db);
|
||||||
|
|
||||||
|
// Clean parameters
|
||||||
|
if (empty($newref) && ! empty($newtitle)) {
|
||||||
|
$newref=strtolower(dol_sanitizeFileName(preg_replace('/\s+/', '-', $newtitle), '-', 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check parameters
|
||||||
|
if (empty($newref)) {
|
||||||
|
$langs->load("errors");
|
||||||
|
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("WEBSITE_TITLE"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Load source object
|
// Load source object
|
||||||
@ -448,7 +460,7 @@ class WebsitePage extends CommonObject
|
|||||||
$object->aliasalt = '';
|
$object->aliasalt = '';
|
||||||
$object->fk_user_creat = $user->id;
|
$object->fk_user_creat = $user->id;
|
||||||
$object->date_creation = $now;
|
$object->date_creation = $now;
|
||||||
$object->title = ($keeptitleunchanged ? '' : $langs->trans("CopyOf").' ').$object->title;
|
$object->title = ($newtitle == '1' ? $object->title : ($newtitle ? $newtitle : $object->title));
|
||||||
if (!empty($newlang)) $object->lang = $newlang;
|
if (!empty($newlang)) $object->lang = $newlang;
|
||||||
if ($istranslation) $object->fk_page = $fromid;
|
if ($istranslation) $object->fk_page = $fromid;
|
||||||
else $object->fk_page = 0;
|
else $object->fk_page = 0;
|
||||||
|
|||||||
@ -1563,6 +1563,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
|
|||||||
if ($action == 'confirm_createpagefromclone')
|
if ($action == 'confirm_createpagefromclone')
|
||||||
{
|
{
|
||||||
$istranslation = (GETPOST('is_a_translation', 'aZ09') == 'on' ? 1 : 0);
|
$istranslation = (GETPOST('is_a_translation', 'aZ09') == 'on' ? 1 : 0);
|
||||||
|
// Protection if it is a translation page
|
||||||
if ($istranslation)
|
if ($istranslation)
|
||||||
{
|
{
|
||||||
if (GETPOST('newlang', 'aZ09') == $objectpage->lang)
|
if (GETPOST('newlang', 'aZ09') == $objectpage->lang)
|
||||||
@ -1571,6 +1572,11 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
|
|||||||
setEventMessages($langs->trans("LanguageMustNotBeSameThanClonedPage"), null, 'errors');
|
setEventMessages($langs->trans("LanguageMustNotBeSameThanClonedPage"), null, 'errors');
|
||||||
$action = 'preview';
|
$action = 'preview';
|
||||||
}
|
}
|
||||||
|
if (GETPOST('newwebsite', 'int') != $object->id) {
|
||||||
|
$error++;
|
||||||
|
setEventMessages($langs->trans("WebsiteMustBeSameThanClonedPageIfTranslation"), null, 'errors');
|
||||||
|
$action = 'preview';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
@ -1592,7 +1598,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf
|
|||||||
}
|
}
|
||||||
|
|
||||||
$objectpage = new WebsitePage($db);
|
$objectpage = new WebsitePage($db);
|
||||||
$resultpage = $objectpage->createFromClone($user, $pageid, GETPOST('pageurl', 'aZ09'), (GETPOST('newlang', 'aZ09') ?GETPOST('newlang', 'aZ09') : ''), $istranslation, $newwebsiteid);
|
$resultpage = $objectpage->createFromClone($user, $pageid, GETPOST('newpageurl', 'aZ09'), (GETPOST('newlang', 'aZ09') ? GETPOST('newlang', 'aZ09') : ''), $istranslation, $newwebsiteid, GETPOST('newtitle', 'alphanohtml'));
|
||||||
if ($resultpage < 0)
|
if ($resultpage < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
@ -2283,10 +2289,7 @@ if (!GETPOST('hide_websitemenu'))
|
|||||||
if ($action == 'createfromclone') {
|
if ($action == 'createfromclone') {
|
||||||
// Create an array for form
|
// Create an array for form
|
||||||
$formquestion = array(
|
$formquestion = array(
|
||||||
array('type' => 'text', 'name' => 'siteref', 'label'=> $langs->trans("WebSite"), 'value'=> 'copy_of_'.$object->ref),
|
array('type' => 'text', 'name' => 'siteref', 'label'=> $langs->trans("WebSite"), 'value'=> 'copy_of_'.$object->ref)
|
||||||
//array('type' => 'checkbox', 'name' => 'is_a_translation', 'label' => $langs->trans("SiteIsANewTranslation"), 'value' => 0),
|
|
||||||
//array('type' => 'other','name' => 'newlang','label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'aZ09')?GETPOST('newlang', 'aZ09'):$langs->defaultlang, 'newlang', 0, null, '', 0, 0, 'minwidth200')),
|
|
||||||
//array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloneSite'), '', 'confirm_createfromclone', $formquestion, 0, 1, 200);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloneSite'), '', 'confirm_createfromclone', $formquestion, 0, 1, 200);
|
||||||
@ -2305,7 +2308,8 @@ if (!GETPOST('hide_websitemenu'))
|
|||||||
array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0),
|
array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0),
|
||||||
array('type' => 'other', 'name' => 'newlang', 'label' => $langs->trans("Language"), 'value' => $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, 1, 0, 0, 'minwidth200', 0, 1)),
|
array('type' => 'other', 'name' => 'newlang', 'label' => $langs->trans("Language"), 'value' => $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, 1, 0, 0, 'minwidth200', 0, 1)),
|
||||||
array('type' => 'other', 'name' => 'newwebsite', 'label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0)),
|
array('type' => 'other', 'name' => 'newwebsite', 'label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0)),
|
||||||
array('type' => 'text', 'tdclass'=>'maxwidth200 fieldrequired', 'name' => 'pageurl', 'label'=> $langs->trans("WEBSITE_PAGENAME"), 'value'=> 'copy_of_'.$objectpage->pageurl),
|
array('type' => 'text', 'tdclass'=>'maxwidth200 fieldrequired', 'name' => 'newtitle', 'label'=> $langs->trans("WEBSITE_TITLE"), 'value'=> $langs->trans("CopyOf").' '.$objectpage->title),
|
||||||
|
array('type' => 'text', 'tdclass'=>'maxwidth200', 'name' => 'newpageurl', 'label'=> $langs->trans("WEBSITE_PAGENAME"), 'value'=> ''),
|
||||||
);
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user