Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
3
3f-timesheet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dockers
3f-timesheet
Commits
9aefbe50
Commit
9aefbe50
authored
Oct 20, 2022
by
Azhan Hannan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes, reset decimal scale to 2
parent
2a6c87d6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
1 deletions
+112
-1
database/migrations/2022_10_20_144220_change_column_type_in_timesheet_dtl_table.php
+32
-0
database/migrations/2022_10_20_144303_change_column_type_in_timesheet_master_table.php
+38
-0
database/migrations/2022_10_20_144403_change_column_type_in_timesheet_prj_table.php
+32
-0
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
+3
-1
packages/portal/timesheet/src/Http/Controllers/FormController.php
+7
-0
No files found.
database/migrations/2022_10_20_144220_change_column_type_in_timesheet_dtl_table.php
0 → 100644
View file @
9aefbe50
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
ChangeColumnTypeInTimesheetDtlTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'timesheet_dtl'
,
function
(
Blueprint
$table
)
{
$table
->
decimal
(
'td_hours'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'timesheet_dtl'
,
function
(
Blueprint
$table
)
{
//
});
}
}
database/migrations/2022_10_20_144303_change_column_type_in_timesheet_master_table.php
0 → 100644
View file @
9aefbe50
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
ChangeColumnTypeInTimesheetMasterTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'timesheet_master'
,
function
(
Blueprint
$table
)
{
$table
->
decimal
(
'tm_chargeable_hrs'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
$table
->
decimal
(
'tm_chargeable_days'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
$table
->
decimal
(
'tm_overhead_hrs'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
$table
->
decimal
(
'tm_overhead_days'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
$table
->
decimal
(
'tm_overtime_hrs'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
$table
->
decimal
(
'tm_total_hours'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
$table
->
decimal
(
'tm_total_days'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'timesheet_master'
,
function
(
Blueprint
$table
)
{
//
});
}
}
database/migrations/2022_10_20_144403_change_column_type_in_timesheet_prj_table.php
0 → 100644
View file @
9aefbe50
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
ChangeColumnTypeInTimesheetPrjTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
$table
->
decimal
(
'tp_hours'
,
10
,
1
)
->
unsigned
()
->
nullable
()
->
change
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'timesheet_prj'
,
function
(
Blueprint
$table
)
{
//
});
}
}
packages/portal/timesheet/resources/views/form/chargeableForm.blade.php
View file @
9aefbe50
...
...
@@ -115,7 +115,9 @@ input[type=number] {
}
?>
<td >
<input type="
text
" onkeypress="
onlynumber
(
event
)
" id="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" name="
hour
[{{
$project
[
'td_project'
]}}][{{
$i
+
1
}}]
" value="
@
if
(
$valuehour
){{
$valuehour
->
td_hours
}}
@
else
@
endif
" min="
0
" max="
24
" style="
padding
:
2
px
;
margin
:
unset
" onchange="
limiter
(
this
,
'{{$project['
td_project
']}}'
);
">
</td>
@endfor
...
...
@@ -201,7 +203,6 @@ input[type=number] {
console.log(isNaN(value));
if(isNaN(value)){
// this.value = '';
value = 0;
}
...
...
@@ -211,6 +212,7 @@ input[type=number] {
}
}
}
console.log("
currenttotal
-->
" + currenttotal);
...
...
packages/portal/timesheet/src/Http/Controllers/FormController.php
View file @
9aefbe50
...
...
@@ -242,7 +242,14 @@ class FormController extends Controller
if
(
$valuehour
==
0
)
{
if
(
$checkTimesheetDetail
)
{
$checkTimesheetDetail
->
td_hours
=
$valuehour
;
$checkTimesheetDetail
->
updated_by
=
$userId
;
$checkTimesheetDetail
->
save
();
}
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment