Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
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
Stefan Warnat
vtigercrm
Commits
077563ac
Commit
077563ac
authored
2 years ago
by
Prasad
Browse files
Options
Downloads
Patches
Plain Diff
Fixed empty string to float type-casting
parent
0af599e4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/Invoice/InvoiceHandler.php
+2
-2
2 additions, 2 deletions
modules/Invoice/InvoiceHandler.php
modules/PurchaseOrder/PurchaseOrderHandler.php
+2
-2
2 additions, 2 deletions
modules/PurchaseOrder/PurchaseOrderHandler.php
with
4 additions
and
4 deletions
modules/Invoice/InvoiceHandler.php
+
2
−
2
View file @
077563ac
...
...
@@ -42,10 +42,10 @@ class InvoiceHandler extends VTEventHandler {
$wsrecord
=
vtws_retrieve
(
$wsid
,
$current_user
);
if
(
$oldCurrency
!=
$newCurrency
&&
$oldCurrency
!=
''
)
{
if
(
$oldConversionRate
!=
''
){
$wsrecord
[
'received'
]
=
floatval
((
$wsrecord
[
'received'
]
/
$oldConversionRate
)
*
$wsrecord
[
'conversion_rate'
]);
$wsrecord
[
'received'
]
=
floatval
((
(
float
)
$wsrecord
[
'received'
]
/
$oldConversionRate
)
*
(
float
)
$wsrecord
[
'conversion_rate'
]);
}
}
$wsrecord
[
'balance'
]
=
floatval
(
$wsrecord
[
'hdnGrandTotal'
]
-
$wsrecord
[
'received'
]);
$wsrecord
[
'balance'
]
=
floatval
(
(
float
)
$wsrecord
[
'hdnGrandTotal'
]
-
(
float
)
$wsrecord
[
'received'
]);
if
(
$wsrecord
[
'balance'
]
==
0
)
{
$wsrecord
[
'invoicestatus'
]
=
'Paid'
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/PurchaseOrder/PurchaseOrderHandler.php
+
2
−
2
View file @
077563ac
...
...
@@ -42,10 +42,10 @@ class PurchaseOrderHandler extends VTEventHandler {
$wsrecord
=
vtws_retrieve
(
$wsid
,
$current_user
);
if
(
$oldCurrency
!=
$newCurrency
&&
$oldCurrency
!=
''
)
{
if
(
$oldConversionRate
!=
''
){
$wsrecord
[
'paid'
]
=
floatval
((
$wsrecord
[
'paid'
]
/
$oldConversionRate
)
*
$wsrecord
[
'conversion_rate'
]);
$wsrecord
[
'paid'
]
=
floatval
((
(
float
)
$wsrecord
[
'paid'
]
/
$oldConversionRate
)
*
(
float
)
$wsrecord
[
'conversion_rate'
]);
}
}
$wsrecord
[
'balance'
]
=
floatval
(
$wsrecord
[
'hdnGrandTotal'
]
-
$wsrecord
[
'paid'
]);
$wsrecord
[
'balance'
]
=
floatval
(
(
float
)
$wsrecord
[
'hdnGrandTotal'
]
-
(
float
)
$wsrecord
[
'paid'
]);
if
(
$wsrecord
[
'balance'
]
==
0
)
$wsrecord
[
'postatus'
]
=
'Received Shipment'
;
$query
=
"UPDATE vtiger_purchaseorder SET balance=?,paid=? WHERE purchaseorderid=?"
;
...
...
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