models

package
v0.0.0-...-246ec96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Business

type Business struct {
	uadmin.Model
	Name                    string `uadmin:"required;search;list_exclude;help:Represents a registered business or an individual's name"`
	TaxIdentificationNumber string
	Owner                   string `uadmin:"required"`
	BusinessType            BusinessType
	Mobile                  string
	Email                   string
	HouseNumber             string
	Street                  string `uadmin:"required"`
	Municipality            string `uadmin:"required"`
	Province                string `uadmin:"required;list_exclude"`
	Country                 string `uadmin:"required;list_exclude"`
	PostalCode              string `uadmin:"required"`
	Delivery                bool   `uadmin:"help:Toggle switch to on to know if the business do delivery."`
	DeliveryCharge          float64
	DeliveryHotline         string
	Information             string     `uadmin:"html;help:For Business additional information."`
	Active                  bool       `uadmin:"help:Toggle switch to on to know if the business is still active or not."`
	CreateDate              *time.Time `uadmin:"read_only;list_exclude"`
	CreatedBy               string     `uadmin:"read_only;list_exclude"`
	UpdateDate              *time.Time `uadmin:"read_only;list_exclude"`
	UpdatedBy               string     `uadmin:"read_only;list_exclude"`
}

func (*Business) Save

func (b *Business) Save()

func (*Business) String

func (b *Business) String() string

type BusinessType

type BusinessType int

-------------------- BUSINESS OPTIONS -------------------- // BusinessType ------------------------------------------

func (BusinessType) Freelance

func (BusinessType) Freelance() BusinessType

Freelance = 5

func (BusinessType) Investing

func (BusinessType) Investing() BusinessType

Investing = 7

func (BusinessType) OnlineSelling

func (BusinessType) OnlineSelling() BusinessType

OnlineSelling = 1

func (BusinessType) OnlineTutoring

func (BusinessType) OnlineTutoring() BusinessType

OnlineTutoring = 2

func (BusinessType) ReSeller

func (BusinessType) ReSeller() BusinessType

ReSeller = 3

func (BusinessType) RemoteJob

func (BusinessType) RemoteJob() BusinessType

RemoteJob = 4

func (BusinessType) Trading

func (BusinessType) Trading() BusinessType

Trading = 6

type ExpensesType

type ExpensesType int

ExpensesType ------------------------------------------

func (ExpensesType) AdvertisingAndMarketing

func (ExpensesType) AdvertisingAndMarketing() ExpensesType

AdvertisingAndMarketing = 4

func (ExpensesType) Equipment

func (ExpensesType) Equipment() ExpensesType

Equipment = 2

func (ExpensesType) Fees

func (ExpensesType) Fees() ExpensesType

Fees = 9

func (ExpensesType) InterestPayment

func (ExpensesType) InterestPayment() ExpensesType

InterestPayment = 8

func (ExpensesType) Other

func (ExpensesType) Other() ExpensesType

Other = 10

func (ExpensesType) Payments

func (ExpensesType) Payments() ExpensesType

Payments = 7

func (ExpensesType) Payroll

func (ExpensesType) Payroll() ExpensesType

Payroll = 3

func (ExpensesType) RentPayment

func (ExpensesType) RentPayment() ExpensesType

RentPayment = 1

func (ExpensesType) Taxes

func (ExpensesType) Taxes() ExpensesType

Taxes = 6

func (ExpensesType) Utilities

func (ExpensesType) Utilities() ExpensesType

Utilities = 5

type IncomeType

type IncomeType int

-------------------- ACCOUNT OPTIONS -------------------- // IncomeType ------------------------------------------

func (IncomeType) Allowance

func (IncomeType) Allowance() IncomeType

Allowance = 2

func (IncomeType) Bonus

func (IncomeType) Bonus() IncomeType

Bonus = 4

func (IncomeType) Other

func (IncomeType) Other() IncomeType

Other = 5

func (IncomeType) PettyCash

func (IncomeType) PettyCash() IncomeType

PettyCash = 3

func (IncomeType) Salary

func (IncomeType) Salary() IncomeType

Salary = 1

type ReportType

type ReportType int

ReportType : Type of Sales Report

func (ReportType) Daily

func (ReportType) Daily() ReportType

Daily = 1

func (ReportType) Monthly

func (ReportType) Monthly() ReportType

Monthly = 3

func (ReportType) Quarterly

func (ReportType) Quarterly() ReportType

Quarterly = 4

func (ReportType) Weekly

func (ReportType) Weekly() ReportType

Weekly = 2

func (ReportType) Yearly

func (ReportType) Yearly() ReportType

Yearly = 5

type Sales

type Sales struct {
	uadmin.Model
	Business           Business `uadmin:"list_exclude"`
	BusinessID         uint
	Name               string     `uadmin:"list_exclude"`
	ReportType         ReportType `uadmin:"required;list_exclude"`
	StartDate          *time.Time `uadmin:"required"`
	TransactionDetails string     `uadmin:"code;read_only;list_exclude"`
	Amount             float64    `uadmin:"read_only"`
	CreatedBy          string     `uadmin:"read_only;list_exclude"`
}

Sales !

func GetDaily

func GetDaily(dateFrom *time.Time) Sales

GetDaily : Calculate total amount of sales for the entire day.

func (*Sales) Save

func (s *Sales) Save()

func (*Sales) String

func (s *Sales) String() string

type Transaction

type Transaction struct {
	uadmin.Model
	Business        Business
	BusinessID      uint            `uadmin:"required;search"`
	TransactionType TransactionType `uadmin:"required;search;list_exclude"`
	IncomeType      IncomeType
	ExpensesType    ExpensesType
	TransferType    TransferType
	Amount          float64    `uadmin:"required"`
	Note            string     `uadmin:"html"`
	CreateDate      *time.Time `uadmin:"read_only;list_exclude"`
	CreatedBy       string     `uadmin:"read_only;list_exclude"`
	UpdateDate      *time.Time `uadmin:"read_only;list_exclude"`
	UpdatedBy       string     `uadmin:"read_only;list_exclude"`
}

func (*Transaction) Save

func (t *Transaction) Save()

func (*Transaction) String

func (t *Transaction) String() string

type TransactionType

type TransactionType int

TransactionType ------------------------------------------

func (TransactionType) Expenses

func (TransactionType) Expenses() TransactionType

Expenses = 2

func (TransactionType) Income

Income = 1

func (TransactionType) Transfer

func (TransactionType) Transfer() TransactionType

Transfer = 3

type TransferType

type TransferType int

TransferType ------------------------------------------

func (TransferType) Bank

func (TransferType) Bank() TransferType

Bank = 1

func (TransferType) GCash

func (TransferType) GCash() TransferType

GCash = 3

func (TransferType) PayPal

func (TransferType) PayPal() TransferType

PayPal = 2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL