Skip to main content Link Search Menu Expand Document (external link)

company.proforma.go


  • It contains functions related to proforma for company.

#1

func getProformaForCompanyHandler
  • It is used to fetch proformas using a Company ID.

First the company ID is fetched using the function:

func getCompanyRCID

Mentioned in application/util.company.middleware

A check is made to ensure that CID isn’t 0.

Then, the proformas are fetched from the CID using the function:

func fetchProformasByCompanyForCompany(ctx, cid, &jps)

Here CID refers to Company ID

  • This takes cid and an empty array of type Proforma as parameters.

Mentioned in application/db.proforma

#2

func postProformaByCompanyHandler
  • It is used to create proformas using a Company ID.

First the company ID is fetched using the function:

func getCompanyRCID

Mentioned in application/util.company.middleware

A check is made to ensure that CID isn’t 0.

Then, Company Recruitment Cycle is fetched using the function:

func FetchCompany(ctx, cid, &companyRC)

Mentioned in rc/db.company

Then, a proforma is created (also containing the company data filled using the above function) using the function:

func createProforma(ctx, &jp)
  • This takes a struct of type Proforma as parameter.

Mentioned in application/db.proforma

#3

func putProformaByCompanyHandler
  • It is used to update proformas using a Company ID.

First the company ID is fetched using the function:

func getCompanyRCID

Mentioned in application/util.company.middleware

A check is made to ensure that CID isn’t 0.

Then, the proforma is updated using the function:

func updateProformaForCompany(ctx, &jp)
  • This takes a struct of type Proforma as parameter.

Mentioned in application/db.proforma

#4

func deleteProformaByCompanyHandler
  • It is used to delete proformas using a Company ID.

First the company ID is fetched using the function:

func getCompanyRCID

Mentioned in application/util.company.middleware

A check is made to ensure that CID isn’t 0.

Then, the proforma is deleted using the function:

func deleteProformaByCompany(ctx, pid, cid)
  • This takes Proforma ID and Company ID as parameter.

Mentioned in application/db.proforma

#5

func getProformaHandlerForCompany
  • It is used to fetch a proforma using Proforma ID and Company ID.

First the company ID is fetched using the function:

func getCompanyRCID

Mentioned in application/util.company.middleware

A check is made to ensure that CID isn’t 0.

Then, the proforma is fetched using the function:

func fetchProformaForCompany(ctx, pid, cid, &jp)
  • This takes Proforma ID, Company ID and a struct of type Proforma as parameter.

Mentioned in application/db.proforma