invoice

package
v0.0.0-...-c407d37 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLongLinesOfAccountingForInvoice

func FetchLongLinesOfAccountingForInvoice(serviceMemberAffiliation models.ServiceMemberAffiliation, ordersIssueDate time.Time, tacCode string, appCtx appcontext.AppContext) ([]models.LineOfAccounting, error)

Fetches the long lines of accounting for an invoice based off a service member, tacCode, and the orders issue date. There is special logic for whether or not the service member affiliation is for the US Coast Guard.

func InitNewSyncadaSFTPSession

func InitNewSyncadaSFTPSession() (services.SyncadaSFTPSender, error)

InitNewSyncadaSFTPSession initialize a NewSyncadaSFTPSession and return services.SyncadaSFTPSender

func NewEDI824Processor

func NewEDI824Processor() services.SyncadaFileProcessor

NewEDI824Processor returns a new EDI824 processor

func NewEDI997Processor

func NewEDI997Processor() services.SyncadaFileProcessor

NewEDI997Processor returns a new EDI997 processor

func NewGHCPaymentRequestInvoiceGenerator

func NewGHCPaymentRequestInvoiceGenerator(icnSequencer sequence.Sequencer, clock clock.Clock) services.GHCPaymentRequestInvoiceGenerator

NewGHCPaymentRequestInvoiceGenerator returns an implementation of the GHCPaymentRequestInvoiceGenerator interface

func NewGexSenderHTTP

func NewGexSenderHTTP(url string, isTrueGexURL bool, tlsConfig *tls.Config, gexBasicAuthUsername string, gexBasicAuthPassword string) services.GexSender

NewGexSenderHTTP creates a new GexSender service object

func NewSFTPClientWrapper

func NewSFTPClientWrapper(client *sftp.Client) services.SFTPClient

NewSFTPClientWrapper initializes a new SFTPClientWrapper and returns a testable SFTPClient

func NewSyncadaSFTPReaderSession

func NewSyncadaSFTPReaderSession(client services.SFTPClient, deleteFilesAfterProcessing bool) services.SyncadaSFTPReader

NewSyncadaSFTPReaderSession initialize a NewSyncadaSFTPSession and return services.SyncadaSFTPReader

Types

type StoreInvoice858C

type StoreInvoice858C struct {
	Storer *storage.FileStorer
}

StoreInvoice858C is a service object to store an invoice's EDI in S3.

func (StoreInvoice858C) Call

func (s StoreInvoice858C) Call(appCtx appcontext.AppContext, edi string, invoice *models.Invoice, userID uuid.UUID) (*validate.Errors, error)

Call stores the EDI/Invoice to S3.

type SyncadaSenderSFTPSession

type SyncadaSenderSFTPSession struct {
	// contains filtered or unexported fields
}

SyncadaSenderSFTPSession contains information to create a new Syncada SFTP session

func (*SyncadaSenderSFTPSession) SendToSyncadaViaSFTP

func (s *SyncadaSenderSFTPSession) SendToSyncadaViaSFTP(appCtx appcontext.AppContext, localDataReader io.Reader, syncadaFileName string) (int64, error)

SendToSyncadaViaSFTP copies specified local content to Syncada's SFTP server

type UploadUpdater

type UploadUpdater struct {
	UserUploader *uploader.UserUploader
}

UploadUpdater is a service object to invoices adding an UserUpload

func (UploadUpdater) Call

func (u UploadUpdater) Call(appCtx appcontext.AppContext, invoice *models.Invoice, userUpload *models.UserUpload) (*validate.Errors, error)

Call updates the Invoice UserUpload and removes an old UserUpload if present

func (UploadUpdater) DeleteUpload

func (u UploadUpdater) DeleteUpload(appCtx appcontext.AppContext, invoice *models.Invoice) error

DeleteUpload deletes an existing UserUpload This function should be called before adding an UserUpload to an Invoice so that the UserUpload is removed from the database and from S3 storage before adding a new UserUpload to Invoice

Jump to

Keyboard shortcuts

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