Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
0dad676f16
16 changed files with 182 additions and 99 deletions
125
ChangeLog
125
ChangeLog
|
|
@ -29,9 +29,10 @@ For users:
|
|||
----------
|
||||
NEW: Compatibility with PHP 8.2
|
||||
NEW: Module Workstation (used to enhance the module BOM and Manufacturing Order) is now stable
|
||||
NEW: Add a CLI tool to regenerate all documents
|
||||
NEW: Add a confirmation popup when deleting extrafields
|
||||
NEW: Add type 'icon' type for extrafields
|
||||
NEW: Close #20930 Use ajax for state loading after country change
|
||||
NEW: #20930 Use ajax for state loading after country change
|
||||
NEW: #23331 Add support for parent projects (#24856)
|
||||
NEW: #22531 Expense report - Add two fields into export : Qty & Unit price (excl.) (#26309)
|
||||
NEW: #22626 date filter thirdparties contracts projects (#22707)
|
||||
|
|
@ -42,54 +43,51 @@ NEW: Accountancy: Add quick navigation with keyboard shortcut on ledger (#26221)
|
|||
NEW: Accountancy: FEC/FEC2 format export with attachments (#26192)
|
||||
NEW: Accountancy: Option to choose length of lettering code
|
||||
NEW: Accountancy: Chart of accounts ES PCG08-PYME-CAT in catalan language
|
||||
NEW: Add a button to create a product or a service from an order or an invoice (#26173)
|
||||
NEW: Add a button to re-encrypt data of a dolcrypt extrafield password
|
||||
NEW: Add a CLI tool to regenerate all documents
|
||||
NEW: Add a goto url from smartphone search page
|
||||
NEW: Add all id prof checker on thirdparty for code compta customer and supplier
|
||||
NEW: Add a protection on purgeFiles
|
||||
NEW: Add chart of accounts PCG08-PYME-CAT for ES in catalan language
|
||||
NEW: add constant to check if qty shipped not greater than qty ordered
|
||||
NEW: Add context for the movement stock (role toconsume/toproduce) on mrp
|
||||
NEW: Add contract link on ticket
|
||||
NEW: Add culum Technical ID in list of details lines of an order (#26164)
|
||||
NEW: Add custom compute for exports
|
||||
NEW: Add custom Text on footer total (#26334)
|
||||
NEW: Add different picto for each type of extrafields (date, string, ...)
|
||||
NEW: Added of a popup on validation instead of a database fielld to know if the user wants to include subwarehouse
|
||||
NEW: Added of the field "include_sub_warehouse" in the table "llx_inventory"
|
||||
NEW: Added VAT free & VAT amounts on payment input
|
||||
NEW: Add ext payment system ID in the payment page with link to Stripe
|
||||
NEW: Add field TechnicalID in list of users
|
||||
NEW: Add filter on status of line of a dictionary
|
||||
NEW: Add get_substitutionarray_other() on shipping odt (#25080)
|
||||
NEW: add IdProfCheck on thirdparty for BE (xxxx.xxx.xxx)
|
||||
NEW: Add index on prelevement_demande
|
||||
NEW: Add invoice subtype in customer invoice (#26543) and template invoice (SQL part) (#26535)
|
||||
NEW: Add label to price level when changing price (#26240)
|
||||
NEW: Add modifications of template invoices into agenda
|
||||
NEW: Add more company information (ProfId7 to 10) (#25266)
|
||||
NEW: Add more information to holiday mailings (#25461)
|
||||
NEW: Add more param on fetch() to prepare perf optimization
|
||||
NEW: Add more tables activated by module activation only
|
||||
NEW: Add new field into $fields array + Creation of the function getChildWarehouse()
|
||||
NEW: Add option for cancel consumed and produced lines (delete lines and rollback stocks) when delete or cancel an manufacturing order (#26254)
|
||||
NEW: Add option in PDF for purchase order and quotation to hide prices
|
||||
NEW: Add option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS
|
||||
NEW: add order supplier submit notif
|
||||
NEW: add parent product column on list
|
||||
NEW: Add picto in product/service list in object lines (#25511)
|
||||
NEW: Add possibility to choose separator #21426
|
||||
NEW: Add preselected update keys attribute to import class and select it by default if filled
|
||||
NEW: Add recurring behaviour
|
||||
NEW: add recursive deletion option for child m os (#26102)
|
||||
NEW: Add refactoring user permission (#26162)
|
||||
NEW: add sorting of product price list by customer (#26483)
|
||||
NEW: Add tab Events/Agenda on recurring invoices
|
||||
NEW: Add the formEditObjectLine hook on commande card and invoice card
|
||||
NEW: Add the picto phone of thirdparty on the kanban view of projects
|
||||
NEW: Add the status of partnership to select partnership for emailing
|
||||
NEW: add Ticket tab on contract
|
||||
NEW: added a button to create a product or a service from an order or an invoice (#26173)
|
||||
NEW: added a button to re-encrypt data of a dolcrypt extrafield password
|
||||
NEW: added a goto url from smartphone search page
|
||||
NEW: added all id prof checker on thirdparty for code compta customer and supplier
|
||||
NEW: added protection on purgeFiles
|
||||
NEW: added a constant to check if qty shipped not greater than qty ordered
|
||||
NEW: added context for the movement stock (role toconsume/toproduce) on mrp
|
||||
NEW: added contract link on ticket
|
||||
NEW: added column 'Technical ID' in list of details lines of an order (#26164)
|
||||
NEW: added custom compute for exports
|
||||
NEW: added custom text on footer total (#26334)
|
||||
NEW: added different picto for each type of extrafields (date, string, ...)
|
||||
NEW: added a popup on validation instead of a database field to know if the user wants to include subwarehouse
|
||||
NEW: added the field "include_sub_warehouse" in the table "llx_inventory"
|
||||
NEW: added VAT free & VAT amounts on payment input
|
||||
NEW: added ext payment system ID in the payment page with link to Stripe
|
||||
NEW: added field Technical ID in list of users
|
||||
NEW: added filter on status of line of a dictionary
|
||||
NEW: added get_substitutionarray_other() on shipping odt (#25080)
|
||||
NEW: added IdProfCheck on thirdparty for BE (xxxx.xxx.xxx)
|
||||
NEW: added index on prelevement_demande
|
||||
NEW: added invoice subtype in customer invoice (#26543) and template invoice (SQL part) (#26535)
|
||||
NEW: added a label to price level when changing price (#26240)
|
||||
NEW: added modifications of template invoices into agenda
|
||||
NEW: added more company information (ProfId7 to 10) (#25266)
|
||||
NEW: added more information to holiday mailings (#25461)
|
||||
NEW: added more param on fetch() to prepare perf optimization
|
||||
NEW: added more tables activated by module activation only
|
||||
NEW: added new field into $fields array + Creation of the function getChildWarehouse()
|
||||
NEW: added option for cancel consumed and produced lines (delete lines and rollback stocks) when delete or cancel an manufacturing order (#26254)
|
||||
NEW: added option in PDF for purchase order and quotation to hide prices
|
||||
NEW: added order supplier submit notif
|
||||
NEW: added parent product column on list
|
||||
NEW: added picto in product/service list in object lines (#25511)
|
||||
NEW: added possibility to choose separator #21426
|
||||
NEW: added preselected update keys attribute to import class and select it by default if filled
|
||||
NEW: added recurring behaviour
|
||||
NEW: added recursive deletion option for child MOs (#26102)
|
||||
NEW: added refactoring user permission (#26162)
|
||||
NEW: added sorting of product price list by customer (#26483)
|
||||
NEW: added tab Events/Agenda on recurring invoices
|
||||
NEW: added the formEditObjectLine hook on commande card and invoice card
|
||||
NEW: added the picto phone of thirdparty on the kanban view of projects
|
||||
NEW: added the status of partnership to select partnership for emailing
|
||||
NEW: added Ticket tab on contract
|
||||
NEW: Agenda: agenda per user use quarter hour split instead of half hour split
|
||||
NEW: Allow generation of delivery note through REST-API (#26226)
|
||||
NEW: Allow sync of currency rates with currency layer by default.
|
||||
|
|
@ -108,6 +106,7 @@ NEW: clone skill object (#26526)
|
|||
NEW: column in table prelevement_lignes for fk_user (#26196)
|
||||
NEW: CONF allow modify ticket classification even if closed
|
||||
NEW: conf to display date entry stock exped and sort in date order (#22625)
|
||||
NEW: Contract: Merge the "Create ..." buttons on contract into one.
|
||||
NEW: create a product from a free line in a document (#22324)
|
||||
NEW: customize position in complete_head_from_modules (#26406)
|
||||
NEW: Date d'entree en stock sur les exped au moment de la création -> Stock date on exped at time of creation
|
||||
|
|
@ -118,19 +117,20 @@ NEW: Donations: Generic doc template for donations (#26338)
|
|||
NEW: drop down for action button show a simple button if only 1 action
|
||||
NEW: Enhance github_commits_perversion to get more stats on git commits
|
||||
NEW: Enhance IPN to support payment_intent.succeeded for both card/ban
|
||||
NEW: Exports: add product barcode on stock exports
|
||||
NEW: Exports: added product barcode on stock exports
|
||||
NEW: extrafields password accepts 'dolcrypt' algorithm (reversible algo)
|
||||
NEW: Factorize a lot of code for numbering modules
|
||||
NEW: filter on from/to period rather than month/year (#26378)
|
||||
NEW: FontAwesome - Add possibility to select another version
|
||||
NEW: Can generate SEPA files for salaries (#26541)
|
||||
NEW: FontAwesome - added possibility to select another version
|
||||
NEW: Get list evaluation with skills details in user fiche (#26510)
|
||||
NEW: hidden conf to disable use of dns_get_record (which can become unresponsive) (#26339)
|
||||
NEW: HR: PDF Generation for each Human Resource Evaluations
|
||||
NEW: improved resource data structure
|
||||
NEW: Intervention: close notification for interventions
|
||||
NEW: Interventions: close notification for interventions
|
||||
NEW: Inventory: include sub warehouse in inventory
|
||||
NEW: Inventory: inventory without virtual products (kits)
|
||||
NEW: Invoices: subtypes for customers and vendors (#26233)
|
||||
NEW: Invoices: start and end date for due date filter on invoice list
|
||||
NEW: Invoice time from task, make task note better display in invoice line
|
||||
NEW: lazy load to substitute project variables (#26451)
|
||||
NEW: LDAP: Active Directory UserAccountControl (#25507)
|
||||
|
|
@ -140,7 +140,6 @@ NEW: Manage rate indirect. (#26449)
|
|||
NEW: Manufacturing Order: add edit line on MO (#26122)
|
||||
NEW: memorize model name for PDF hooks
|
||||
NEW: Menu editor is responsive
|
||||
NEW: Merge the "Create ..." buttons on contract into one.
|
||||
NEW: ModuleBuilder: Can modify the picto into ModuleBuilder
|
||||
NEW: ModuleBuilder: Form for add object's property on ModuleBuilder
|
||||
NEW: More accurate tooltip on what admin permissions are
|
||||
|
|
@ -151,7 +150,7 @@ NEW: no need to create invoice supplier object on supplier card for standalone c
|
|||
NEW: Open-Surveys: Add a public page to list all open surveys
|
||||
NEW: Option to show label, ref+label or only ref of product in TakePOS
|
||||
NEW: payment full amount detail tooltip
|
||||
NEW: Payment: Can edit both the Test and Live stripe customer account on payment
|
||||
NEW: Payments: Can edit both the Test and Live stripe customer account on payment
|
||||
NEW: possibility to deselect line when create a recurring invoice + missing to use fk_parent_line
|
||||
NEW: Projects: List - use select2 multiselect for status
|
||||
NEW: Projects: massactions to delete projects
|
||||
|
|
@ -162,11 +161,11 @@ NEW: Retrieve VAT details from the Greek Ministry of Finance GSIS SOAP web servi
|
|||
NEW: Right for stats orders (#24607)
|
||||
NEW: rights and check access to create portal accounts
|
||||
NEW: Row in list higher height (#26177)
|
||||
NEW: Salaries: Can generate SEPA files for salaries (#26541)
|
||||
NEW: Save date of RUM creation when creating a Stripe SEPA mandate
|
||||
NEW: Shipment: can include service (for information and invoicing) (#26407)
|
||||
NEW: Shipments: can include service (for information and invoicing) (#26407)
|
||||
NEW: Show id of module on the tooltip module help page
|
||||
NEW: show VAT free amount on payment input close #26208 (#26209)
|
||||
NEW: start and end date for due date filter on invoice list
|
||||
NEW: Sub total in list (#26165)
|
||||
NEW: Support html content for combo list of email recipient
|
||||
NEW: TakePOS: add constant to check qty asked is available (#24820)
|
||||
|
|
@ -174,6 +173,7 @@ NEW: TakePOS: add constant to choose contact instead of customer (#24807)
|
|||
NEW: TakePOS: amount label with or without tax in free product (#24829)
|
||||
NEW: TakePOS: compatibility with lots and serials (#26426)
|
||||
NEW: TakePOS: use default customer, category and product when enable TakePOS (#25031)
|
||||
NEW: TakePOS: added option TAKEPOS_HIDE_PRODUCT_PRICES to hide prices in TakePOS
|
||||
NEW: Tickets: add and list external contributors on ticket public interface
|
||||
NEW: Third-Parties: add total line to third-parties list (#26148)
|
||||
NEW: Tooltips are using ajax by default
|
||||
|
|
@ -187,12 +187,7 @@ NEW: use account address in sepa mandate (#23642)
|
|||
NEW: VAT rate - Add entity
|
||||
NEW: Website: Support of js into the Dolibarr server preview
|
||||
NEW: When an user unset the batch management of products, transformation of each batch stock movement in global stock movement
|
||||
NEW: PDF Generation for each Human Resource Evaluations.
|
||||
|
||||
SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
|
||||
SEC: Add action confirm_... as sensitive to need a CSRF token
|
||||
SEC: Disable not used PHP streams
|
||||
SEC: Add option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY
|
||||
|
||||
|
||||
For developers or integrators:
|
||||
|
|
@ -201,6 +196,12 @@ For developers or integrators:
|
|||
QUAL Reduce very seriously the technical debt (using PHPStan, Psalm and Rector)
|
||||
NEW Tool in dev/tools/rector to autofix code using style coding practice rules
|
||||
|
||||
SECURITY
|
||||
SEC: #25512 applicative anti bruteforce - security on too many login attempts (#25520)
|
||||
SEC: added action confirm_... as sensitive to need a CSRF token
|
||||
SEC: Disable not used PHP streams
|
||||
SEC: added option MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY
|
||||
|
||||
PERFORMANCE
|
||||
PERF: Removed a useless fetch_thirdparty
|
||||
PERF: Perf avoid 2 useless fetch into the triggers of agenda.
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class Subscription extends CommonObject
|
|||
public $table_element = 'subscription';
|
||||
|
||||
/**
|
||||
* @var int Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by fk_soc, 'field@table'=Test with link by field@table
|
||||
* @var string Does myobject support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by fk_soc, 'field@table'=Test with link by field@table
|
||||
*/
|
||||
public $ismultientitymanaged = 'fk_adherent@adherent';
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class DolibarrApiAccess implements iAuthenticate
|
|||
/**
|
||||
* @var User $user Loggued user
|
||||
*/
|
||||
public static $user = '';
|
||||
public static $user = null;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1475,7 +1475,7 @@ class BOM extends CommonObject
|
|||
$this->error = $tmpproduct->error;
|
||||
return -1;
|
||||
}
|
||||
$line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : (float) $tmpproduct->pmp);
|
||||
$line->unit_cost = (float) price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : (float) $tmpproduct->pmp);
|
||||
if (empty($line->unit_cost)) {
|
||||
if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) {
|
||||
if ($productFournisseur->fourn_remise_percent != "0") {
|
||||
|
|
@ -1826,17 +1826,17 @@ class BOMLine extends CommonObjectLine
|
|||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
/**
|
||||
* @var int Calculated cost for the BOM line
|
||||
* @var float Calculated cost for the BOM line
|
||||
*/
|
||||
public $total_cost = 0;
|
||||
|
||||
/**
|
||||
* @var int Line unit cost based on product cost price or pmp
|
||||
* @var float Line unit cost based on product cost price or pmp
|
||||
*/
|
||||
public $unit_cost = 0;
|
||||
|
||||
/**
|
||||
* @var Bom array of Bom in line
|
||||
* @var array array of Bom in line
|
||||
*/
|
||||
public $childBom = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ if ($resql) {
|
|||
$workstation = new Workstation($this->db);
|
||||
$res = $workstation->fetch($sub_bom_product->fk_default_workstation);
|
||||
if ($res > 0) {
|
||||
$sub_bom_line->total_cost = price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
|
||||
$sub_bom_line->total_cost = (float) price2num($qty * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
|
||||
}
|
||||
|
||||
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'"><span class="amount">'.price(price2num($sub_bom_line->total_cost, 'MT')).'</span></td>';
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ class Bookmark extends CommonObject
|
|||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
public $picto = 'bookmark';
|
||||
|
||||
/**
|
||||
* @var string Last error number. For example: 'DB_ERROR_RECORD_ALREADY_EXISTS', '12345', ...
|
||||
* @var string Last error number. For example: 'DB_ERROR_RECORD_ALREADY_EXISTS', '12345', ...
|
||||
*/
|
||||
public $errno;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ class Bookmark extends CommonObject
|
|||
public $id;
|
||||
|
||||
/**
|
||||
* @var int User ID. If > 0, bookmark of one user. If == 0, bookmark public (for everybody)
|
||||
* @var int User ID. If > 0, bookmark of one user. If == 0, bookmark public (for everybody)
|
||||
*/
|
||||
public $fk_user;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class ActionCommReminder extends CommonObject
|
|||
public $table_element = 'actioncomm_reminder';
|
||||
|
||||
/**
|
||||
* @var array Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
* @var int Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
public $ismultientitymanaged = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class Cpaiement extends CommonDict
|
|||
$this->type = trim($this->type);
|
||||
}
|
||||
if (isset($this->active)) {
|
||||
$this->active = trim($this->active);
|
||||
$this->active = (int) $this->active;
|
||||
}
|
||||
if (isset($this->accountancy_code)) {
|
||||
$this->accountancy_code = trim($this->accountancy_code);
|
||||
|
|
@ -250,7 +250,7 @@ class Cpaiement extends CommonDict
|
|||
$this->type = trim($this->type);
|
||||
}
|
||||
if (isset($this->active)) {
|
||||
$this->active = trim($this->active);
|
||||
$this->active = (int) $this->active;
|
||||
}
|
||||
if (isset($this->accountancy_code)) {
|
||||
$this->accountancy_code = trim($this->accountancy_code);
|
||||
|
|
@ -365,12 +365,11 @@ class Cpaiement extends CommonDict
|
|||
public function initAsSpecimen()
|
||||
{
|
||||
$this->id = 0;
|
||||
|
||||
$this->code = '';
|
||||
$this->libelle = '';
|
||||
$this->label = '';
|
||||
$this->type = '';
|
||||
$this->active = '';
|
||||
$this->active = 0;
|
||||
$this->accountancy_code = '';
|
||||
$this->module = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class CUnits extends CommonDict
|
|||
$this->libelle = trim($this->short_label);
|
||||
}
|
||||
if (isset($this->unit_type)) {
|
||||
$this->active = trim($this->unit_type);
|
||||
$this->active = (int) $this->unit_type;
|
||||
}
|
||||
if (isset($this->active)) {
|
||||
$this->active = (int) $this->active;
|
||||
|
|
@ -406,12 +406,9 @@ class CUnits extends CommonDict
|
|||
*/
|
||||
public function getUnitFromCode($code, $mode = 'code', $unit_type = '')
|
||||
{
|
||||
if ($mode == 'short_label') {
|
||||
return dol_getIdFromCode($this->db, $code, 'c_units', 'short_label', 'rowid', 0, " AND unit_type = '".$this->db->escape($unit_type)."'");
|
||||
} elseif ($mode == 'code') {
|
||||
return dol_getIdFromCode($this->db, $code, 'c_units', 'code', 'rowid', 0, " AND unit_type = '". $this->db->escape($unit_type) ."'");
|
||||
if ($mode == 'short_label' || $mode == 'code') {
|
||||
return dol_getIdFromCode($this->db, $code, 'c_units', $mode, 'rowid', 0, " AND unit_type = '".$this->db->escape($unit_type)."'");
|
||||
}
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -921,4 +921,53 @@ class FormProjets extends Form
|
|||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Output html select to select opportunity status
|
||||
*
|
||||
* @param string $page Page
|
||||
* @param string $selected Id preselected
|
||||
* @param int $percent_value percentage of the opportunity
|
||||
* @param string $htmlname_status name of HTML element for status select
|
||||
* @param string $htmlname_percent name of HTML element for percent input
|
||||
* @param string $filter optional filters criteras
|
||||
* @param int $nooutput No print output. Return it only.
|
||||
* @return void|string
|
||||
*/
|
||||
public function formOpportunityStatus($page, $selected = '', $percent_value = 0, $htmlname_status = 'none', $htmlname_percent = 'none', $filter = '', $nooutput = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
$out = '';
|
||||
if ($htmlname_status != "none" && $htmlname_percent != 'none') {
|
||||
$out .= '<form method="post" action="' . $page . '">';
|
||||
$out .= '<input type="hidden" name="action" value="set_opp_status">';
|
||||
$out .= '<input type="hidden" name="token" value="' . newToken() . '">';
|
||||
$out .= $this-> selectOpportunityStatus($htmlname_status, $selected, 1, 0, 0, 0, 'minwidth150 inline-block valignmiddle', 1, 1);
|
||||
$out .= ' / <span title="'.$langs->trans("OpportunityProbability").'"> ';
|
||||
$out .= '<input class="width50 right" type="text" id="'.$htmlname_percent.'" name="'.$htmlname_percent.'" title="'.dol_escape_htmltag($langs->trans("OpportunityProbability")).'" value="'.$percent_value.'"> %';
|
||||
$out .= '</span>';
|
||||
$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="' . $langs->trans("Modify") . '">';
|
||||
$out .= '</form>';
|
||||
} else {
|
||||
if ($selected > 0) {
|
||||
$code = dol_getIdFromCode($this->db, $selected, 'c_lead_status', 'rowid', 'code');
|
||||
$out .= $langs->trans("OppStatus".$code);
|
||||
|
||||
// Opportunity percent
|
||||
$out.= ' / <span title="'.$langs->trans("OpportunityProbability").'"> ';
|
||||
$out.= price($percent_value, 0, $langs, 1, 0).' %';
|
||||
$out.= '</span>';
|
||||
} else {
|
||||
$out .= " ";
|
||||
}
|
||||
}
|
||||
|
||||
if ($nooutput) {
|
||||
return $out;
|
||||
} else {
|
||||
print $out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9558,7 +9558,7 @@ function dol_osencode($str)
|
|||
* @param string $fieldid Field to get
|
||||
* @param int $entityfilter Filter by entity
|
||||
* @param string $filters Filters to add. WARNING: string must be escaped for SQL and not coming from user input.
|
||||
* @return int Return integer <0 if KO, Id of code if OK
|
||||
* @return int<-1,max> ID of code if OK, 0 if key empty, -1 if KO
|
||||
* @see $langs->getLabelFromKey
|
||||
*/
|
||||
function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = 'id', $entityfilter = 0, $filters = '')
|
||||
|
|
@ -9567,7 +9567,7 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid =
|
|||
|
||||
// If key empty
|
||||
if ($key == '') {
|
||||
return '';
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Check in cache
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2023 Christian Foellmann <christian@foellmann.de>
|
||||
* 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
|
||||
|
|
@ -853,7 +854,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||
|
||||
if (empty($object->actionmsg2)) {
|
||||
if (empty($object->context['actionmsg2'])) {
|
||||
$object->actionmsg2 = $langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref ? $object->newref : $object->ref));
|
||||
$object->actionmsg2 = $langs->transnoentities("SupplierOrderSubmitedInDolibarr", ($object->newref ?: $object->ref), $object->getInputMethod());
|
||||
} else {
|
||||
$object->actionmsg2 = $object->context['actionmsg2'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,5 +212,6 @@ ALTER TABLE llx_knowledgemanagement_knowledgerecord MODIFY COLUMN answer longtex
|
|||
-- Rename const to add customer categories on not customer/prospect third-party if enabled
|
||||
UPDATE llx_const SET name = 'THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT' WHERE name = 'THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER';
|
||||
|
||||
ALTER TABLE llx_mailing ADD COLUMN messtype varchar(16) DEFAULT 'email' after rowid;
|
||||
ALTER TABLE llx_fichinter ADD COLUMN signed integer DEFAULT NULL AFTER duree;
|
||||
|
||||
ALTER TABLE llx_mailing ADD COLUMN messtype varchar(16) DEFAULT 'email' after rowid;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ create table llx_fichinter
|
|||
datee date, -- date de fin d'intervention
|
||||
datet date, -- date de terminaison de l'intervention
|
||||
duree real, -- duree totale de l'intervention
|
||||
signed integer DEFAULT NULL, -- signed status
|
||||
description text,
|
||||
note_private text,
|
||||
note_public text,
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ DispatchSupplierOrder=Receiving purchase order %s
|
|||
FirstApprovalAlreadyDone=First approval already done
|
||||
SecondApprovalAlreadyDone=Second approval already done
|
||||
SupplierOrderReceivedInDolibarr=Purchase Order %s received %s
|
||||
SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted
|
||||
SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted (%s)
|
||||
SupplierOrderClassifiedBilled=Purchase Order %s set billed
|
||||
OtherOrders=Other orders
|
||||
SupplierOrderValidatedAndApproved=Supplier order is validated and approved : %s
|
||||
|
|
|
|||
|
|
@ -404,6 +404,42 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($action == 'set_opp_status' && $user->rights->projet->creer) {
|
||||
$error = 0;
|
||||
if (GETPOSTISSET('opp_status')) {
|
||||
$object->opp_status = $opp_status;
|
||||
}
|
||||
if (GETPOSTISSET('opp_percent')) {
|
||||
$object->opp_percent = $opp_percent;
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||
if ($object->opp_amount && ($object->opp_status <= 0)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorOppStatusRequiredIfAmount"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$result = $object->update($user);
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
if ($result == -4) {
|
||||
setEventMessages($langs->trans("ErrorRefAlreadyExists"), null, 'errors');
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$db->rollback();
|
||||
$action = 'edit';
|
||||
} else {
|
||||
$db->commit();
|
||||
}
|
||||
}
|
||||
|
||||
// Build doc
|
||||
if ($action == 'builddoc' && $permissiontoadd) {
|
||||
// Save last template used to generate document
|
||||
|
|
@ -1347,18 +1383,16 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) {
|
|||
|
||||
if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES') && !empty($object->usage_opportunity)) {
|
||||
// Opportunity status
|
||||
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
|
||||
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) {
|
||||
print $langs->trans("OppStatus".$code);
|
||||
print '<tr><td>'.$langs->trans("OpportunityStatus");
|
||||
if ($action != 'edit_opp_status' && $user->hasRight('projet', 'creer')) {
|
||||
print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit_opp_status&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>';
|
||||
}
|
||||
|
||||
// Opportunity percent
|
||||
print ' <span title="'.$langs->trans("OpportunityProbability").'"> / ';
|
||||
if (strcmp($object->opp_percent, '')) {
|
||||
print price($object->opp_percent, 0, $langs, 1, 0).' %';
|
||||
}
|
||||
print '</span></td></tr>';
|
||||
print '</td><td>';
|
||||
$html_name_status = ($action == 'edit_opp_status') ? 'opp_status' : 'none';
|
||||
$html_name_percent = ($action == 'edit_opp_status') ? 'opp_percent' : 'none';
|
||||
$percent_value = (GETPOSTISSET('opp_percent') ? GETPOST('opp_percent') : (strcmp($object->opp_percent, '') ? vatrate($object->opp_percent) : ''));
|
||||
$formproject->formOpportunityStatus($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->opp_status, $percent_value, $html_name_status, $html_name_percent);
|
||||
print '</td></tr>';
|
||||
|
||||
// Opportunity Amount
|
||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue