Skip to content

kingga/workflow-timesheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xero Workflow Weekly CSV Export Parser

This small package parses the CSV export function from Xero's Workflow timesheet system into a set of container classes. The format will look something like this:

Week: [
    getStart() => DateTime
    getEnd() => DateTime
    getTotalTime() => Float
    getDays() => [
        Day: [
            getDate() => DateTime
            getDayName() => String [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]
            getTotalTime() => Float
            getEntries() => [
                Entry: [
                    getClient() => String
                    getJobId() => String
                    getJob() => String
                    getTask() => String
                    getTime() => Float
                ]
            ]
        ]
    ]
]

Installation

Run the command composer require kingga/workflow-timesheet.

Usage

$parser = new Kingga\WorkflowTimesheet\Parser;
$timesheet = $parser->parse(__DIR__ . '/Time-Sheet.csv');

dd($timesheet);

Testing

Run the command composer test.

About

Xero workflow weekly CSV parser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages