Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Christian Cruz Garrido
vtigercrm
Commits
d53b71b3
Commit
d53b71b3
authored
4 years ago
by
Uma
Browse files
Options
Downloads
Patches
Plain Diff
Fixes
#1288
Payment duration picklist values enhanced
parent
89d48758
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Migration/schema/720_to_721.php
+13
-0
13 additions, 0 deletions
modules/Migration/schema/720_to_721.php
with
13 additions
and
0 deletions
modules/Migration/schema/720_to_721.php
+
13
−
0
View file @
d53b71b3
...
...
@@ -230,4 +230,17 @@ if (defined('VTIGER_UPGRADE')) {
$sql
=
'INSERT INTO vtiger_ws_fieldtype(uitype,fieldtype) VALUES (?,?)'
;
$params
=
array
(
'69'
,
'image'
);
$db
->
pquery
(
$sql
,
$params
);
$moduleInstance
=
Vtiger_Module_Model
::
getInstance
(
'SalesOrder'
);
$fieldInstance
=
Vtiger_Field_Model
::
getInstance
(
'payment_duration'
,
$moduleInstance
);
$fieldInstance
->
setPicklistValues
(
array
(
'Net 01 day'
,
'Net 05 days'
,
'Net 07 days'
,
'Net 10 days'
,
'Net 15 days'
));
$paymentList
=
array
(
'Net 01 day'
=>
'1'
,
'Net 05 days'
=>
'2'
,
'Net 07 days'
=>
'3'
,
'Net 10 days'
=>
'4'
,
'Net 15 days'
=>
'5'
,
'Net 30 days'
=>
'6'
,
'Net 45 days'
=>
'7'
,
'Net 60 days'
=>
'8'
);
$query
=
'UPDATE vtiger_payment_duration SET sortorderid = CASE payment_duration'
;
foreach
(
$paymentList
as
$label
=>
$sortOrderId
)
{
$query
.
=
" WHEN '
$label
' THEN
$sortOrderId
"
;
}
$query
.
=
' ELSE sortorderid END'
;
$db
->
pquery
(
$query
,
array
());
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment