-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de93783
commit cbc529f
Showing
32 changed files
with
494 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Xeroizer | ||
module Record | ||
module Payroll | ||
|
||
class AccountModel < PayrollBaseModel | ||
|
||
set_permissions :read | ||
|
||
end | ||
|
||
class Account < PayrollBase | ||
|
||
string :type | ||
string :code | ||
string :name | ||
guid :account_id | ||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Xeroizer | ||
module Record | ||
module Payroll | ||
|
||
class EmployeeGroupsModel < PayrollBaseModel | ||
|
||
set_standalone_model true | ||
set_xml_root_name 'EmployeeGroups' | ||
set_xml_node_name 'EmployeeGroups' | ||
end | ||
|
||
# child of TrackingCategories | ||
class EmployeeGroups < PayrollBase | ||
|
||
set_primary_key false | ||
|
||
guid :tracking_category_id | ||
string :tracking_category_name | ||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module Xeroizer | ||
module Record | ||
module Payroll | ||
|
||
class PayRunModel < PayrollBaseModel | ||
|
||
set_permissions :read, :write, :update | ||
|
||
end | ||
|
||
# http://developer.xero.com/documentation/payroll-api/payruns/ | ||
class PayRun < PayrollBase | ||
|
||
set_primary_key :pay_run_id | ||
|
||
guid :pay_run_id | ||
|
||
guid :payroll_calendar_id | ||
|
||
date :pay_run_period_end_date | ||
date :pay_run_period_start_date | ||
date :payment_date | ||
|
||
decimal :wages | ||
decimal :deductions | ||
decimal :tax | ||
decimal :super | ||
decimal :reimbursement | ||
decimal :net_pay | ||
|
||
string :pay_run_status | ||
string :payslip_message | ||
|
||
#has_many :payslips | ||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
module Xeroizer | ||
module Record | ||
module Payroll | ||
|
||
class PayslipModel < PayrollBaseModel | ||
|
||
set_permissions :read, :update | ||
|
||
end | ||
|
||
# http://developer.xero.com/documentation/payroll-api/payslip/ | ||
class Payslip < PayrollBase | ||
|
||
set_primary_key :payslip_id | ||
|
||
guid :payslip_id | ||
|
||
guid :employee_id | ||
|
||
has_many :earnings_lines | ||
#has_many :timesheet_earnings_lines # TODO | ||
has_many :deduction_lines | ||
#has_many :leave_accrual_lines # TODO | ||
has_many :superannuation_lines, :internal_name_singular => "super_line", :model_name => "SuperLine" | ||
has_many :reimbursement_lines | ||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module Xeroizer | ||
module Record | ||
module Payroll | ||
|
||
class SettingModel < PayrollBaseModel | ||
|
||
set_permissions :read | ||
|
||
set_standalone_model true | ||
set_xml_root_name 'Settings' | ||
set_xml_node_name 'Settings' | ||
end | ||
|
||
class Setting < PayrollBase | ||
|
||
set_primary_key false | ||
|
||
has_many :accounts | ||
has_many :timesheet_categories, :model_name => 'TimesheetCategories' | ||
has_many :employee_groups, :model_name => 'EmployeeGroups' | ||
integer :days_in_payroll_year | ||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module Xeroizer | ||
module Record | ||
module Payroll | ||
|
||
class TimesheetCategoriesModel < PayrollBaseModel | ||
|
||
set_standalone_model true | ||
set_xml_root_name 'TimesheetCategories' | ||
set_xml_node_name 'TimesheetCategories' | ||
end | ||
|
||
# child of TrackingCategories | ||
class TimesheetCategories < PayrollBase | ||
|
||
set_primary_key false | ||
|
||
guid :tracking_category_id | ||
string :tracking_category_name | ||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module Xeroizer | ||
module Record | ||
module Payroll | ||
|
||
class TrackingCategoriesModel < PayrollBaseModel | ||
|
||
set_permissions :read | ||
|
||
set_standalone_model true | ||
set_xml_root_name 'TrackingCategories' | ||
set_xml_node_name 'TrackingCategories' | ||
end | ||
|
||
# child of Settings | ||
class TrackingCategories < PayrollBase | ||
|
||
set_primary_key false | ||
|
||
has_many :employee_groups | ||
has_many :timesheet_categories | ||
|
||
end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.