;;==================Learnwells.com======================;;

;; youtube.com/learnwell/c

;; Following Code is to pop up a reminder while company load - LEARNWELL

[System : Event]
	LEARNWELLcmpload: Load Company : true : call : LEARNWELLReminder

[FUNCTION : LEARNWELLReminder]
	01 : Display : LEARNWELLTSKReport
	
;; Following Code is to add a button to Gateway Menu - LEARNWELL
	
[#Menu:Gateway of Tally]
	Add:Button:TaskBtn
	
[Button:TaskBtn]
	Title:"My Tasks"
	Key:F7
	Action:Alter:MyTaskReport
	
;;Following Code is to generate a user fed Task Chart - LEARNWELL
	
[Report:MyTaskReport]
	Object:Company
	Form:MyTaskForm
	
[Form:MyTaskForm]
	Height:12% Screen
	Width:20% Screen
	Vertical Align:Bottom
	Horizontal Align:Left
	Background:"White"
	Part:MyTaskPart
	No Confirmation:Yes
	
[Part:MyTaskPart]
	Line:MyTaskLine

[Line:MyTaskLine]
	Field:Long Prompt, MyTaskFld
	Local:Field:Long Prompt:Set as:"Do you want to set your tasks ?"
	Local:Field:Long Prompt:Color:"Blue"
	
[Field:MyTaskFld]
	Use:Logical Field
	Set as: No 
	Sub Form:UserTaskReport:$$Value
	Storage:MyTask
	
[Report:UserTaskReport]
	Form:UserTaskForm
	
[Form:UserTaskForm]
	Background:"Azure1"
	Height:100% Screen
	Width:100% Screen
	Parts:UserTaskBody
	Bottom Part:LEARNWELLMark
	No Confirmation:Yes
	
[Part:UserTaskBody]
	Line:UserTaskTitLine, UserTaskBodyLine
	Repeat:UserTaskBodyLine:UserTaskList
	Break On:$$IsEnd:$UserTasks
	Scrolled        : Vertical
   	Common Border   : Yes
	
[Line:UserTaskTitLine]
	Fields:TaskNoFld, TaskFld, UserNameFld, TaskDTFld, 
	Border:Thick Bottom
	Space Bottom:2
	
[Field:TaskNoFld]
	Use:Name Field
	Set as:"Task No"
	Width:7% Screen
	Style:Large Bold
	Border:Thin Right
	Color:"Yellow"
	Read Only:Yes
	Skip:Yes
	Align:Center
	
	
[Field:TaskFld]
	Use:Name Field
	Set as:"My Tasks"
	Width:50% Screen
	Color:"Yellow"
	Read Only:Yes
	Skip:Yes
	Style:Large Bold
	Border:Thin Right
	Align:Center
	
[Field:UserNameFld]
	Use:Name Field
	Set as:"User Name"
	Width:23% Screen
	Style:Large Bold
	Border:Thin Right
	Color:"Yellow"
	Read Only:Yes
	Skip:Yes
	Align:Center
	
[Field:TaskDtFld]
	Use:Name Field
	Set as:"Task Date"
	Width:20% Screen
	Color:"Yellow"
	Read Only:Yes
	Skip:Yes
	Style:Large Bold
	Border:Thin Right
	Align:Center

	
[Line:UserTaskBodyLine]
	Fields:UserTaskSrNo,UserTaskDes, UserTaskNm, UserTaskDue
	
[Field:UserTaskSrNo]
	Use:Number Field
	Set as:$$Line
	Color:"Yellow"
	Read Only:Yes
	Skip Forward:Yes
	Width:7% Screen
		
[Field:UserTaskDes]
	Use:Name Field
	Set as:$UserTasks
	Color:"Yellow"
	Width:50% Screen
	Storage:UserTasks
	
[Field:UserTaskNm]
	Use:Name Field
	Set as:$$CmpUserName
	Color:"Yellow"
	Width:23% Screen
	Inactive:$$IsEnd:$UserTasks
	Storage:UserName
	
[Field:UserTaskDue]
	Use:Uni Date Field
	Set as:$TaskDate
	Color:"Yellow"
	Width:20% SCreen
	Storage:TaskDate
	Inactive:$$IsEnd:$UserTasks
	Control:LEARNWELLMSG1:$$IsEmpty:#UserTaskDue OR $TaskDate < $MachineDate
	
	
[System:UDF]
	UserTaskList:Aggregate:45000
	UserName:String:45001
	UserTasks:String:45002
	TaskDate:Date:45003
	MyTask:Logical:45004

[System:Formulae]
	LEARNWELLMSG1:"Please Enter a Valid Date"

	
[Color:Azure1]
	RGB:51, 102, 153
	
;; Following Code is to generate Personal Reminder - LEARNWELL	

[Report:LEARNWELLTSKReport]
	Form:LEARNWELLTSKForm
	
[Form:LEARNWELLTSKForm]
	Height:40% Screen
	Width:40% Screen
	Background:"Yellow"
	Part:TaskPart
	Bottom Part:LEARNWELLMark
	
[Part:TaskPart]
	Lines:DateLine,TSKTit, TSKLn, NoTSKLn
	Repeat:TSKLn:TSKColl
	Space Top:0.5
	
[Line:DateLine]
	Fields:Datetit,DtFld, TMFld
	
[Field:Datetit]
	Use:Name Field
	Set as:"TODAY"
	Width:33.33% SCreen
	Align:Centre
	Color:"Blue"
	Border:Thin Bottom
	
[Field:DtFld]
	Use:Uni Date Field 
	Set as:$MachineDate
	Width:33.33% Screen
	Align:Centre
	Color:"Blue"
	Border:Thin Bottom
	
[Field:TMFld]
	Type:Time
	Set as:$$MachineTime
	Width:33.33% Screen
	Align:Center
	Color:"Blue"
	Border:Thin Bottom
	
[Line:TSKTit]
	Field:TSKTitFld
	
[Field:TSKTitFld]
	Use:Name Field
	Set as:"My Personal Tasks for next 5 Days"
	Full Width:Yes
	Align:Center
	Color:"Blue"
	Border:Thick Bottom
	Style:Large Bold
	
[Line:TSKLn]
	Fields: TSKNo, TSKDet, TSKDue
	Space Top:1
	
[Field:TSKNo]
	Use:Number Field
	Set as:$$Line
	Width:5% Screen
	Align:Centre
	Color:"Red"
	Background:If ($$Date:$TaskDate = $$Date:$MachineDate) Then "Green" Else "Yellow"
	Style:If ($$Date:$TaskDate = $$Date:$MachineDate) Then "Large Bold" Else "Normal"
	
[Field:TSKDet]
	Use:Name Field
	Set as:$UserTasks
	Width:75% Screen
	Color:"Red"
	Background:If ($$Date:$TaskDate = $$Date:$MachineDate) Then "Green" Else "Yellow"
	Style:If ($$Date:$TaskDate = $$Date:$MachineDate) Then "Large Bold" Else "Normal"
	
[Field:TSKDue]
	Use:Date Field
	Set as:$TaskDate
	Width:20% Screen
	Color:"Red"
	Background:If ($$Date:$TaskDate = $$Date:$MachineDate) Then "Green" Else "Yellow"
	Style:If ($$Date:$TaskDate = $$Date:$MachineDate) Then "Large Bold" Else "Normal"
	
[Line:NoTSKLn]
	Field:NoTSKFld
	Invisible:Not $$IsEmpty:#TSKDet
	Space Top:2
	
[Field:NoTSKFld]
	Use:Name Field
	Set as:"Relax - No personal tasks within next 5 days !!!"
	Full Width:Yes
	Style:Large Bold
	Align:Centre
	Color:"Red"
	
[Collection:TSKColl]
	Type:UserTaskList:Company
	Child Of:##SVCurrentCompany
	Fetch:UserTasks, TaskDate
	Filter:TaskDtFilter
	Filter:TaskFilter
	
	
[System:Formulae]
	TaskFilter:$UserName = $$CmpUserName 
	TaskDtFilter:($$Date:$TaskDate > $$Date:$MachineDate) AND +
				($$Date:$TaskDate - $$Date:$MachineDate) < 6 OR ($$Date:$TaskDate = $$Date:$MachineDate)
				
[Part:LEARNWELLMark]
	Line:LEARNWELLMarkLn
		
[Line:LEARNWELLMarkLn]
	Field:LEARNWELLMarkFld
	
[Field:LEARNWELLMarkFld]
	Use:Name Field
	Set as:"TDL Developed by LEARNWELL" + " ( LEARNWELL 2017)"
	Full Width:Yes
	Align:Center
	Color:"Red"
	Style:LEARNWELL007
	Border:Thin Bottom
	Read Only:Yes
	Skip Forward:Yes
	
[Style:LEARNWELL007]
	Font:"Calibri (Body)"
	Height:8
	Italic:Yes

	
;;========================================================================;;
;;End of File - LEARNWELL