Documentation
¶
Index ¶
- type ARecord
- func (r *ARecord) Ascii() []byte
- func (r *ARecord) Parse(buf []byte) error
- func (r *ARecord) SequenceNumber() int
- func (r *ARecord) SetSequenceNumber(number int)
- func (r *ARecord) Type() string
- func (r *ARecord) Validate() error
- func (r *ARecord) ValidateAmountCodes() error
- func (r *ARecord) ValidateCombinedFSFilingProgram() error
- func (r *ARecord) ValidateForeignEntityIndicator() error
- func (r *ARecord) ValidateLastFilingIndicator() error
- func (r *ARecord) ValidatePayerState() error
- func (r *ARecord) ValidatePayerZipCode() error
- func (r *ARecord) ValidateRecordSequenceNumber() error
- func (r *ARecord) ValidateTransferAgentIndicator() error
- func (r *ARecord) ValidateTypeOfReturn() error
- type BRecord
- func (r *BRecord) Ascii() []byte
- func (r *BRecord) DirectSales() (*string, error)
- func (r *BRecord) Fatca() (*string, error)
- func (r *BRecord) FederalState() int
- func (r *BRecord) IncomeTax() (int, int, error)
- func (r *BRecord) MarshalJSON() ([]byte, error)
- func (r *BRecord) Parse(buf []byte) error
- func (r *BRecord) PaymentAmount(index string) (int, error)
- func (r *BRecord) PaymentCodes() string
- func (r *BRecord) SecondTIN() (*string, error)
- func (r *BRecord) SequenceNumber() int
- func (r *BRecord) SetSequenceNumber(number int)
- func (r *BRecord) SetTypeOfReturn(typeOfReturn string) error
- func (r *BRecord) Type() string
- func (r *BRecord) TypeOfReturn() string
- func (r *BRecord) UnmarshalJSON(data []byte) error
- func (r *BRecord) Validate() error
- func (r *BRecord) ValidateCorrectedReturnIndicator() error
- func (r *BRecord) ValidateForeignCountryIndicator() error
- func (r *BRecord) ValidatePayeeState() error
- func (r *BRecord) ValidatePayeeZipCode() error
- func (r *BRecord) ValidateRecordSequenceNumber() error
- func (r *BRecord) ValidateTypeOfTIN() error
- type CRecord
- func (r *CRecord) Ascii() []byte
- func (r *CRecord) ControlTotal(index string) (int, error)
- func (r *CRecord) Parse(buf []byte) error
- func (r *CRecord) SequenceNumber() int
- func (r *CRecord) SetSequenceNumber(number int)
- func (r *CRecord) TotalCodes() string
- func (r *CRecord) Type() string
- func (r *CRecord) Validate() error
- func (r *CRecord) ValidateRecordSequenceNumber() error
- type FRecord
- type KRecord
- func (r *KRecord) Ascii() []byte
- func (r *KRecord) ControlTotal(index string) (int, error)
- func (r *KRecord) Parse(buf []byte) error
- func (r *KRecord) PaymentCodes() string
- func (r *KRecord) SequenceNumber() int
- func (r *KRecord) SetSequenceNumber(number int)
- func (r *KRecord) Type() string
- func (r *KRecord) Validate() error
- func (r *KRecord) ValidateCombinedFederalStateCode() error
- func (r *KRecord) ValidateRecordSequenceNumber() error
- type Record
- type TRecord
- func (r *TRecord) Ascii() []byte
- func (r *TRecord) Parse(buf []byte) error
- func (r *TRecord) SequenceNumber() int
- func (r *TRecord) SetSequenceNumber(number int)
- func (r *TRecord) Type() string
- func (r *TRecord) Validate() error
- func (r *TRecord) ValidateCompanyState() error
- func (r *TRecord) ValidateCompanyZipCode() error
- func (r *TRecord) ValidateForeignEntityIndicator() error
- func (r *TRecord) ValidatePriorYearDataIndicator() error
- func (r *TRecord) ValidateRecordSequenceNumber() error
- func (r *TRecord) ValidateTestFileIndicator() error
- func (r *TRecord) ValidateVendorForeignEntityIndicator() error
- func (r *TRecord) ValidateVendorIndicator() error
- func (r *TRecord) ValidateVendorState() error
- func (r *TRecord) ValidateVendorZipCode() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ARecord ¶
type ARecord struct {
// Required. Enter “A.”
RecordType string `json:"record_type" validate:"required"`
// Required. Enter “2019.”
// If reporting prior year data, report the year which applies (2018, 2017, etc.) and set the Prior Year Data Indicator in field position 6.
PaymentYear int `json:"payment_year" validate:"required"`
// Required for CF/SF.
// Enter “1” (one) if approved and submitting information as part
// of the CF/SF Program or if submitting a test file in order to
// obtain approval for the CF/SF Program. Otherwise, enter a
// blank.
// Note 1: If the Payer “A” Record is coded for CF/SF, there
// must be coding in the Payee “B” Records and the State Totals
// “K” Records.
// Note 2: If “1” (one) is entered in this field position, be sure to
// code the Payee “B” Records with the appropriate state code.
// Refer to Part A. Sec. 12, Table 1, Participating States and
// Codes, for further information.
CombinedFSFilingProgram string `json:"combined_fs_filing_program"`
// Required. Enter the valid nine-digit taxpayer identification
// number assigned to the payer. Do not enter blanks, hyphens,
// or alpha characters. Filling the field with all zeros, ones, twos,
// etc., will result in an incorrect TIN.
// Note: For foreign entities that are not required to have a TIN,
// this field must be blank; however, the Foreign Entity Indicator,
// position 52 of the “A” Record, must be set to one (1).
TIN string `json:"payer_tin" validate:"required"`
// Enter the four characters of the name control or enter blanks.
PayerNameControl string `json:"payer_name_control"`
// Enter “1” (one) if this is the last year this payer name and TIN
// will file information returns electronically or on paper.
// Otherwise, enter a blank.
LastFilingIndicator string `json:"last_filing_indicator"`
// Required. Enter the appropriate code. Left justify and fill
// unused positions with blanks.
TypeOfReturn string `json:"type_of_return" validate:"required"`
// Required. Enter the appropriate amount code(s) for the type
// of return being reported. In most cases, the box numbers on
// paper information returns correspond with the amount codes
// used to file electronically. However, if discrepancies occur,
// Publication 1220 governs for filing electronically. Enter the
// amount codes in ascending sequence; numeric characters
// followed by alphas. Left justify the information and fill unused
// positions with blanks.
// Note: A type of return and an amount code must be present
// in every Payer “A” Record even if no money amounts are
// being reported. For a detailed explanation of the information
// to be reported in each amount code, refer to the appropriate
// paper instructions for each form.
AmountCodes string `json:"amount_codes" validate:"required"`
// Enter “1” (one) if the transmitter is a foreign entity. If the transmitter is not a foreign entity, enter a blank.
ForeignEntityIndicator string `json:"foreign_entity_indicator"`
// Required. Enter the name of the payer whose TIN appears in
// positions 12-20 of the “A” Record. (The transfer agent’s name
// is entered in the Second Payer Name Line Field, if
// applicable). Left justify information and fill unused positions
// with blanks. Delete extraneous information.
FirstPayerNameLine string `json:"first_payer_name" validate:"required"`
// If position 133 Transfer (or Paying) Agent Indicator contains a
// “1” (one), this field must contain the name of the transfer or
// paying agent.
// If position 133 contains a “0” (zero), this field may contain
// either a continuation of the First Payer Name Line or blanks.
// Left justify the information. Fill unused positions with blanks
SecondPayerNameLine string `json:"second_payer_name"`
// Required. Enter the appropriate numeric code from the table below
// 1: The entity in the Second Payer Name Line Field is the transfer (or paying) agent.
// 0: The entity shown is not the transfer (or paying) agent (that is, the Second Payer Name Line Field either contains
// a continuation of the First Payer Name Line Field or blanks).
TransferAgentIndicator string `json:"transfer_agent_control" validate:"required"`
// Required. If position 133 Transfer Agent Indicator is “1” (one),
// enter the shipping address of the transfer or paying agent.
// Otherwise, enter the actual shipping address of the payer. The
// street address includes street number, apartment or suite
// number, or P.O. Box address if mail is not delivered to a street
// address. Left justify the information and fill unused positions
// with blanks.
// For U.S. addresses, the payer city, state, and ZIP Code must
// be reported as 40-, 2-, and 9-position fields, respectively.
// Filers must adhere to the correct format for the payer city,
// state, and ZIP Code.
// For foreign addresses, filers may use the payer city, state, and
// ZIP Code as a continuous 51-position field. Enter information
// in the following order: city, province or state, postal code, and
// the name of the country. When reporting a foreign address,
// the Foreign Entity Indicator in position 52 must contain a
// "1" (one).
PayerShippingAddress string `json:"payer_shipping_address" validate:"required"`
// Required. If the Transfer Agent Indicator in position 133 is a
// “1” (one), enter the city, town, or post office of the transfer
// agent. Otherwise, enter payer’s city, town, or post office city.
// Do not enter state and ZIP Code information in this field. Left
// justify the information and fill unused positions with blanks.
PayerCity string `json:"payer_city" validate:"required"`
// Required. Enter the valid U.S. Postal Service state abbreviation.
PayerState string `json:"payer_state" validate:"required"`
// Required. Enter the valid nine-digit ZIP Code assigned by the
// U.S. Postal Service. If only the first five digits are known, left
// justify the information and fill unused positions with blanks. For
// foreign countries, alpha characters are acceptable as long as
// the filer has entered a “1” (one) in “A” Record, field position 52
// Foreign Entity Indicator.
PayerZipCode string `json:"payer_zip_code" validate:"required"`
// Enter the payer’s telephone number and extension. Omit
// hyphens. Left justify the information and fill unused positions
// with blanks.
PayerTelephoneNumber string `json:"payer_telephone_number_and_ext"`
// Required. Enter the number of the record as it appears within
// the file. The record sequence number for the “T” Record will
// always be “1” (one), since it is the first record on the file and
// the file can have only one “T” Record. Each record thereafter
// must be increased by one in ascending numerical sequence,
// that is, 2, 3, 4, etc. Right justify numbers with leading zeros in
// the field. For example, the “T” Record sequence number
// would appear as “00000001” in the field, the first “A” Record
// would be “00000002,” the first “B” Record, “00000003,” the
// second “B” Record, “00000004” and so on until the final record
// of the file, the “F” Record.
RecordSequenceNumber int `json:"record_sequence_number" validate:"required"`
}
func (*ARecord) SequenceNumber ¶
SequenceNumber returns sequence number of the record
func (*ARecord) SetSequenceNumber ¶
SequenceNumber set sequence number of the record
func (*ARecord) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*ARecord) ValidateAmountCodes ¶
func (*ARecord) ValidateCombinedFSFilingProgram ¶
func (*ARecord) ValidateForeignEntityIndicator ¶
func (*ARecord) ValidateLastFilingIndicator ¶
func (*ARecord) ValidatePayerState ¶
func (*ARecord) ValidatePayerZipCode ¶ added in v0.1.4
func (*ARecord) ValidateRecordSequenceNumber ¶
func (*ARecord) ValidateTransferAgentIndicator ¶
func (*ARecord) ValidateTypeOfReturn ¶
type BRecord ¶
type BRecord struct {
// Required. Enter “B.”
RecordType string `json:"record_type" validate:"required"`
// Required. Enter “2019.”
// If reporting prior year data, report the year which applies (2018, 2017, etc.) and set the Prior Year Data Indicator in field position 6.
PaymentYear int `json:"payment_year" validate:"required"`
// Required for corrections only.
// Indicates a corrected return. Enter the appropriate code from
// the following table.
// G: For a one-transaction correction or the first of a two transaction correction
// C: For a second transaction of a two-transaction correction
// Blank: For an original return
// Note: C, G, and non-coded records must be reported using
// separate Payer “A” Records.
CorrectedReturnIndicator string `json:"corrected_return_indicator"`
// If determinable, enter the first four characters of the last name
// of the person whose TIN is being reported in positions 12-20
// of the “B” Record. Otherwise, enter blanks. Last names of
// less than four characters must be left justified and fill the
// unused positions with blanks.
NameControl string `json:"payees_name_control"`
// This field is used to identify the taxpayer identification number
// (TIN) in positions 12-20 as either an employer identification
// number (EIN), a social security number (SSN), an individual
// taxpayer identification number (ITIN) or an adoption taxpayer
// identification number (ATIN). Enter the appropriate code from
// the following table:
// 1: EIN : A business, organization, some
// sole proprietors or other entity
// 2: SSN : An individual, including some sole proprietors
// 2: ITIN : An individual required to have a
// taxpayer identification number but
// who is not eligible to obtain an SSN
// 2: ATIN : An adopted individual prior to the
// assignment of a SSN
// Blank : N/A : If the type of TIN is not
// determinable, enter a blank
TypeOfTIN string `json:"type_of_tin"`
// Required. Enter the nine-digit taxpayer identification number
// of the payee (SSN, ITIN, ATIN, or EIN). Do not enter hyphens
// or alpha characters.
// If an identification number has been applied for but not
// received, enter blanks. All zeros, ones, twos, etc., will have
// the effect of an incorrect TIN. If the TIN is not available, enter
// blanks.
TIN string `json:"payees_tin" validate:"required"`
// Required if submitting more than one information return of the
// same type for the same payee. Enter any number assigned by
// the payer to the payee that can be used by the IRS to
// distinguish between information returns. This number must be
// unique for each information return of the same type for the
// same payee. If a payee has more than one reporting of the
// same document type, it is vital that each reporting have a
// unique account number. For example, if a payer has three
// separate pension distributions for the same payee and three
// separate Forms 1099-R are filed; three separate unique
// account numbers are required. A payee’s account number
// may be given a unique sequencing number, such as 01, 02, or
// A, B, etc., to differentiate each reported information return. Do
// not use the payee’s TIN since this will not make each record
// unique. This information is critical when corrections are filed.
// This number will be provided with the backup withholding
// notification and may be helpful in identifying the branch or
// subsidiary reporting the transaction. The account number can
// be any combination of alpha, numeric, or special characters. If
// fewer than 20 characters are used, filers may either left or
// right justify, filling the remaining positions with blanks.
// Forms 1099-LS and 1099-SB - use this field to report
// “Policy Number.”
PayerAccountNumber string `json:"payers_account_number_for_payee"`
// Enter the office code of the payer. Otherwise, enter blanks.
// For payers with multiple locations, this field may be used to
// identify the location of the office submitting the information
// returns. This code will also appear on backup withholding
// notices.
PayerOfficeCode string `json:"payers_office_code"`
// Required. Filers should allow for all payment amounts. For
// those not used, enter zeros. Each payment field must contain
// 12 numeric characters. Each payment amount must contain
// U.S. dollars and cents. The right-most two positions represent
// cents in the payment amount fields. Do not enter dollar signs,
// commas, decimal points, or negative payments, except those
// items that reflect a loss on Form 1099-B, 1099-OID, or 1099-
// Q. Positive and negative amounts are indicated by placing a
// “+” (plus) or “-” (minus) sign in the left-most position of the
// payment amount field. A negative over punch in the unit’s
// position may be used instead of a minus sign, to indicate a
// negative amount. If a plus sign, minus sign, or negative over
// punch is not used, the number is assumed to be positive.
// Negative over punch cannot be used in PC created files.
// Payment amounts must be right justified and fill unused
// positions with zeros.
PaymentAmount1 int `json:"payment_amount_1"`
PaymentAmount2 int `json:"payment_amount_2"`
PaymentAmount3 int `json:"payment_amount_3"`
PaymentAmount4 int `json:"payment_amount_4"`
PaymentAmount5 int `json:"payment_amount_5"`
PaymentAmount6 int `json:"payment_amount_6"`
PaymentAmount7 int `json:"payment_amount_7"`
PaymentAmount8 int `json:"payment_amount_8"`
PaymentAmount9 int `json:"payment_amount_9"`
PaymentAmountA int `json:"payment_amount_A"`
PaymentAmountB int `json:"payment_amount_B"`
PaymentAmountC int `json:"payment_amount_C"`
PaymentAmountD int `json:"payment_amount_D"`
PaymentAmountE int `json:"payment_amount_E"`
PaymentAmountF int `json:"payment_amount_F"`
PaymentAmountG int `json:"payment_amount_G"`
PaymentAmountH int `json:"payment_amount_H"`
PaymentAmountJ int `json:"payment_amount_J"`
// If the address of the payee is in a foreign country, enter a
// “1” (one) in this field. Otherwise, enter blank. When filers use
// the foreign country indicator, they may use a free format for
// the payee city, state, and ZIP Code.
// Enter information in the following order: city, province or state,
// postal code, and the name of the country. Do not enter
// address information in the First or Second Payee Name Lines.
ForeignCountryIndicator string `json:"foreign_country_indicator"`
// Required. Enter the name of the payee (preferably last
// name first) whose taxpayer identification number (TIN) was
// provided in positions 12-20 of the Payee “B” Record.
// Left justify the information and fill unused positions with
// blanks. If more space is required for the name, use the
// Second Payee Name Line Field. If reporting information for a
// sole proprietor, the individual’s name must always be present
// on the First Payee Name Line. The use of the business
// name is optional in the Second Payee Name Line Field. End
// the First Payee Name Line with a full word. Extraneous
// words, titles, and special characters (that is, Mr., Mrs., Dr.,
// period, apostrophe) should be removed from the Payee
// Name Lines. A hyphen (-) and an ampersand (&) are the only
// acceptable special characters for First and Second Payee
// Name Lines.
// Note: If a filer is required to report payments made through
// Foreign Intermediaries and Foreign Flow-Through Entities on
// Form 1099, see the General Instructions for Certain
// Information Returns for reporting instructions.
FirstPayeeNameLine string `json:"first_payee_name_line" validate:"required"`
// If there are multiple payees (for example, partners, joint
// owners, or spouses), use this field for those names not
// associated with the TIN provided in positions 12-20 of the “B”
// Record, or if not enough space was provided in the First
// Payee Name Line, continue the name in this field. Do not
// enter address information. It is important that filers provide as
// much payee information to the IRS as possible to identify the
// payee associated with the TIN. See the Note under the First
// Payee Name Line. Left justify the information and fill unused
// positions with blanks.
SecondPayeeNameLine string `json:"second_payee_name_line"`
// Required. Enter the mailing address of the payee.
// The street address should include number, street, apartment
// or suite number, or P.O. Box if mail is not delivered to a
// street address. Left justify the information and fill unused
// positions with blanks.
// Do not enter data other than the payee’s mailing address.
PayeeMailingAddress string `json:"payee_mailing_address" validate:"required"`
// Required. Enter the city, town or post office. Enter APO or
// FPO if applicable. Do not enter state and ZIP Code
// information in this field. Left justify the information and fill
// unused positions with blanks.
PayeeCity string `json:"payee_city" validate:"required"`
// Required. Enter the valid U.S. Postal Service state
// abbreviations for states or the appropriate postal identifier
// (AA, AE, or AP).
PayeeState string `json:"payee_state" validate:"required"`
// Required. Enter the valid ZIP Code (nine-digit or five-digit)
// assigned by the U.S. Postal Service.
// For foreign countries, alpha characters are acceptable as
// long as the filer has entered a “1” (one) in the Foreign
// Country Indicator, located in position 247 of the “B” Record. If
// only the first five-digits are known, left justify the information
// and fill the unused positions with blanks.
PayeeZipCode string `json:"payee_zip_code" validate:"required"`
// Required. Enter the number of the record as it appears
//within the file. The record sequence number for the “T”
//Record will always be one (1), since it is the first record on
//the file and the file can have only one “T” Record in a file.
//Each record, thereafter, must be increased by one in
//ascending numerical sequence, that is, 2, 3, 4, etc. Right
//justify numbers with leading zeros in the field. For example,
//the “T” Record sequence number would appear as
//“00000001” in the field, the first “A” Record would be
//“00000002,” the first “B” Record, “00000003,” the second “B”
//Record, “00000004”, and so on until the final record of the
//file, the “F” Record.
RecordSequenceNumber int `json:"record_sequence_number" validate:"required"`
// contains filtered or unexported fields
}
func (*BRecord) DirectSales ¶ added in v0.1.4
Type returns direct sales of “B” record
func (*BRecord) FederalState ¶ added in v0.1.4
Type returns FS code of “B” record
func (*BRecord) MarshalJSON ¶
Marshal returns the JSON encoding
func (*BRecord) PaymentAmount ¶
PaymentAmount returns payment amount
func (*BRecord) PaymentCodes ¶
PaymentAmount returns payment codes
func (*BRecord) SequenceNumber ¶
SequenceNumber returns sequence number of the record
func (*BRecord) SetSequenceNumber ¶
SequenceNumber set sequence number of the record
func (*BRecord) SetTypeOfReturn ¶
SetTypeOfReturn set type of return of the record
func (*BRecord) TypeOfReturn ¶
SetTypeOfReturn returns type of return of the record
func (*BRecord) UnmarshalJSON ¶
Unmarshal parses the JSON-encoded data
func (*BRecord) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*BRecord) ValidateCorrectedReturnIndicator ¶
func (*BRecord) ValidateForeignCountryIndicator ¶
func (*BRecord) ValidatePayeeState ¶
func (*BRecord) ValidatePayeeZipCode ¶ added in v0.1.4
func (*BRecord) ValidateRecordSequenceNumber ¶
func (*BRecord) ValidateTypeOfTIN ¶
type CRecord ¶
type CRecord struct {
// Required. Enter “C.”
RecordType string `json:"record_type" validate:"required"`
// Required. Enter the total number of “B” Records covered by
// the preceding “A” Record.
// Right justify the information and fill unused positions with
// zeros.
NumberPayees int `json:"number_of_payees" validate:"required"`
// Required. Accumulate totals of any payment amount fields
// in the “B” Records into the appropriate control total fields of
// the “C” Record. Control totals must be right justified and
// unused control total fields zero-filled. All control total fields
// are 18 positions in length. Each payment amount must
// contain U.S. dollars and cents. The right-most two positions
// represent cents in the payment amount fields. Do not enter
// dollar signs, commas, decimal points, or negative payments,
// except those items that reflect a loss on Form 1099-B, 1099-
// OID, or 1099-Q. Positive and negative amounts are indicated
// by placing a “+” (plus) or “-” (minus) sign in the left-most
// position of the payment amount field.
ControlTotal1 int `json:"control_total_1"`
ControlTotal2 int `json:"control_total_2"`
ControlTotal3 int `json:"control_total_3"`
ControlTotal4 int `json:"control_total_4"`
ControlTotal5 int `json:"control_total_5"`
ControlTotal6 int `json:"control_total_6"`
ControlTotal7 int `json:"control_total_7"`
ControlTotal8 int `json:"control_total_8"`
ControlTotal9 int `json:"control_total_9"`
ControlTotalA int `json:"control_total_A"`
ControlTotalB int `json:"control_total_B"`
ControlTotalC int `json:"control_total_C"`
ControlTotalD int `json:"control_total_D"`
ControlTotalE int `json:"control_total_E"`
ControlTotalF int `json:"control_total_F"`
ControlTotalG int `json:"control_total_G"`
ControlTotalH int `json:"control_total_H"`
ControlTotalJ int `json:"control_total_J"`
// Required. Enter the number of the record as it appears
// within the file. The record sequence number for the “T”
// Record will always be “1” (one), since it is the first record on
// the file and the file can have only one “T” Record in a file.
// Each record, thereafter, must be increased by one in
// ascending numerical sequence, that is, 2, 3, 4, etc. Right
// justify numbers with leading zeros in the field. For example,
// the “T” Record sequence number would appear as
// “00000001” in the field, the first “A” Record would be
// “00000002,” the first “B” Record, “00000003,” the second “B”
// Record, “00000004” and so on until the final record of the
// file, the “F” Record.
RecordSequenceNumber int `json:"record_sequence_number" validate:"required"`
}
func (*CRecord) ControlTotal ¶
ControlTotal returns total of any payment amount field
func (*CRecord) SequenceNumber ¶
SequenceNumber returns sequence number of the record
func (*CRecord) SetSequenceNumber ¶
SequenceNumber set sequence number of the record
func (*CRecord) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*CRecord) ValidateRecordSequenceNumber ¶
type FRecord ¶
type FRecord struct {
// Required. Enter “F.”
RecordType string `json:"record_type" validate:"required"`
// Enter zeros.
Zero int `json:"zero"`
// Enter the total number of Payer “A” Records in the entire file.
// Right justify the information and fill unused positions with
// zeros or enter all zeros.
NumberPayerRecords int `json:"number_of_payer_records"`
// If this total was entered in the “T” Record, this field may be
// blank filled. Enter the total number of Payee “B” Records
// reported in the file. Right justify the information and fill
// unused positions with zeros.
TotalNumberPayees int `json:"total_number_of_payees"`
// Required. Enter the number of the record as it appears
// within the file. The record sequence number for the “T”
// Record will always be “1” (one), since it is the first record on
// the file and the file can have only one “T” Record in a file.
// Each record, thereafter, must be increased by one in
// ascending numerical sequence, that is, 2, 3, 4, etc. Right
// justify numbers with leading zeros in the field. For example,
// the “T” Record sequence number would appear as
// “00000001” in the field, the first “A” Record would be
// “00000002,” the first “B” Record, “00000003,” the second “B”
// Record, “00000004” and so on until the final record of the
// file, the “F” Record.
RecordSequenceNumber int `json:"record_sequence_number" validate:"required"`
}
func (*FRecord) SequenceNumber ¶
SequenceNumber returns sequence number of the record
func (*FRecord) SetSequenceNumber ¶
SequenceNumber set sequence number of the record
func (*FRecord) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*FRecord) ValidateRecordSequenceNumber ¶
type KRecord ¶
type KRecord struct {
// Required. Enter “K.”
RecordType string `json:"record_type" validate:"required"`
// Required. Enter the total number of “B” Records being
// coded for this state. Right justify the information and fill
// unused positions with zeros.
NumberPayees int `json:"number_of_payees" validate:"required"`
// Required. Accumulate totals of any payment amount fields
// in the “B” Records for each state being reported into the
// appropriate control total fields of the appropriate “K” Record.
// Each payment amount must contain U.S. dollars and cents.
// The right-most two positions represent cents in the payment
// amount fields. Control totals must be right justified and fill
// unused positions with zeros. All control total fields are
// eighteen positions in length. Do not enter dollar signs,
// commas, decimal points, or negative payments, except those
// items that reflect a loss on Form 1099-B or 1099-OID.
// Positive and negative amounts are indicated by placing a “+”
// (plus) or “-” (minus) sign in the left-most position of the
// payment amount field.
ControlTotal1 int `json:"control_total_1"`
ControlTotal2 int `json:"control_total_2"`
ControlTotal3 int `json:"control_total_3"`
ControlTotal4 int `json:"control_total_4"`
ControlTotal5 int `json:"control_total_5"`
ControlTotal6 int `json:"control_total_6"`
ControlTotal7 int `json:"control_total_7"`
ControlTotal8 int `json:"control_total_8"`
ControlTotal9 int `json:"control_total_9"`
ControlTotalA int `json:"control_total_A"`
ControlTotalB int `json:"control_total_B"`
ControlTotalC int `json:"control_total_C"`
ControlTotalD int `json:"control_total_D"`
ControlTotalE int `json:"control_total_E"`
ControlTotalF int `json:"control_total_F"`
ControlTotalG int `json:"control_total_G"`
ControlTotalH int `json:"control_total_H"`
ControlTotalJ int `json:"control_total_J"`
// Required. Enter the number of the record as it appears
// within the file. The record sequence number for the “T”
// Record will always be “1” (one), since it is the first record on
// the file and the file can have only one “T” Record in a file.
// Each record, thereafter, must be increased by one in
// ascending numerical sequence, that is, 2, 3, 4, etc. Right
// justify numbers with leading zeros in the field. For example,
// the “T” Record sequence number would appear as
// “00000001” in the field, the first “A” Record would be
// “00000002,” the first “B” Record, “00000003,” the second “B”
// Record, “00000004” and so on through the final record of the
// file, the “F” Record.
RecordSequenceNumber int `json:"record_sequence_number" validate:"required"`
// Aggregate totals of the state income tax withheld field in the
// Payee “B” Records. Otherwise, enter blanks. (This field is for
// the convenience of filers.)
StateIncomeTaxWithheldTotal string `json:"state_income_tax_withheld_total"`
// Aggregate totals of the local income tax withheld field in the
// Payee “B” Records. Otherwise, enter blanks. (This field is for
// the convenience of filers.)
LocalIncomeTaxWithheldTotal string `json:"local_income_tax_withheld_total"`
// Required. Enter the CF/SF code assigned to the state which
// is to receive the information.
CombinedFederalStateCode string `json:"combined_federal_state_code" validate:"required"`
}
func (*KRecord) ControlTotal ¶
ControlTotal returns total of any payment amount field
func (*KRecord) PaymentCodes ¶
PaymentAmount returns payment codes
func (*KRecord) SequenceNumber ¶
SequenceNumber returns sequence number of the record
func (*KRecord) SetSequenceNumber ¶
SequenceNumber set sequence number of the record
func (*KRecord) Validate ¶
Validate performs some checks on the record and returns an error if not Validated
func (*KRecord) ValidateCombinedFederalStateCode ¶
func (*KRecord) ValidateRecordSequenceNumber ¶
type Record ¶
type Record interface {
Type() string
SequenceNumber() int
SetSequenceNumber(int)
Parse([]byte) error
Ascii() []byte
Validate() error
}
General record interface
func NewARecord ¶
func NewARecord() Record
func NewBRecord ¶
func NewCRecord ¶
func NewCRecord() Record
func NewFRecord ¶
func NewFRecord() Record
func NewKRecord ¶
func NewKRecord() Record
func NewTRecord ¶
func NewTRecord() Record
type TRecord ¶
type TRecord struct {
// Required. Enter “T.”
RecordType string `json:"record_type" validate:"required"`
// Required. Enter “2019.”Foreign
// If reporting prior year data, report the year which applies (2018, 2017, etc.) and set the Prior Year Data Indicator in field position 6.
PaymentYear int `json:"payment_year" validate:"required"`
// Required. Enter “P” only if reporting prior year data. Otherwise, enter a blank.
// Do not enter a “P” if the tax year is 2019.
// The FIRE System accepts 2010 through 2018 for prior years. You cannot mix tax years within a file.
PriorYearDataIndicator string `json:"prior_year_data_indicator" validate:"required"`
// Required. Enter the transmitter’s nine-digit taxpayer identification number (TIN).
TIN string `json:"transmitter_tin" validate:"required"`
// Required. Enter the five-character alphanumeric Transmitter Control Code (TCC) assigned by the IRS.
TCC string `json:"transmitter_control_code" validate:"required"`
// Required for test files only. Enter a “T” if this is a test file. Otherwise, enter a blank.
TestFileIndicator string `json:"test_file_indicator"`
// Enter “1” (one) if the transmitter is a foreign entity. If the transmitter is not a foreign entity, enter a blank.
ForeignEntityIndicator string `json:"foreign_entity_indicator"`
// Required. Enter the transmitter name.
// Left justify the information and fill unused positions with blanks
TransmitterName string `json:"transmitter_name" validate:"required"`
// Enter any additional information that may be part of the name.
// Left justify the information and fill unused positions with blanks.
TransmitterNameContinuation string `json:"transmitter_name_contd"`
// Required. Enter company name associated with the address in field positions 190-229.
CompanyName string `json:"company_name" validate:"required"`
// Enter any additional information that may be part of the company name.
CompanyNameContinuation string `json:"company_name_contd"`
// Required. Enter the mailing address associated with the Company Name in field positions 110-149 where correspondence should be sent.
// For U.S. address, the payer city, state, and ZIP Code must be reported as a 40-, 2-, and 9-position field, respectively.
// Filers must adhere to the correct format for the payer city, state, and ZIP Code.
// For foreign address, filers may use the payer city, state, and ZIP Code as a continuous 51-position field.
// Enter information in the following order: city, province or state, postal code, and the name of the country.
// When reporting a foreign address, the Foreign Entity Indicator in position 29 must contain a “1” (one).
CompanyMailingAddress string `json:"company_mailing_address" validate:"required"`
// Required. Enter the city, town, or post office where correspondence should be sent.
CompanyCity string `json:"company_city" validate:"required"`
// Required. Enter U.S. Postal Service state abbreviation.
CompanyState string `json:"company_state" validate:"required"`
// Required. Enter the nine-digit ZIP Code assigned by the U.S.
// Postal Service. If only the first five digits are known, left justify the information and fill unused positions with blanks.
CompanyZipCode string `json:"company_zip_code" validate:"required"`
// Enter the total number of Payee “B” Records reported in the file.
// Right justify the information and fill unused positions with zeros.
TotalNumberPayees int `json:"total_number_of_payees"`
// Required. Enter the name of the person to contact when problems with the file or transmission are encountered.
ContactName string `json:"contact_name" validate:"required"`
// Required. Enter the telephone number of the person to contact regarding electronic files. Omit hyphens.
// If no extension is available, left justify the information and fill unused positions with blanks.
// Example: The IRS telephone number of 866-455-7438 with an extension of 52345 would be 866455743852345.
ContactTelephoneNumber string `json:"contact_telephone_number_and_ext" validate:"required"`
// Required if available. Enter the email address of the person to contact regarding electronic files.
// If no email address is available, enter blanks. Left justify.
ContactEmailAddress string `json:"contact_email_address"`
// Required. Enter the number of the record as it appears within the
// file. The record sequence number for the “T” Record will always be
// one (1) since it is the first record on the file and the file can have
// only one “T” Record. Each record thereafter must be increased by
// one in ascending numerical sequence, that is, 2, 3, 4, etc. Right
// justify numbers with leading zeros in the field. For example, the “T”
// Record sequence number would appear as “00000001” in the field,
// the first “A” Record would be “00000002,” the first “B” Record,
// “00000003,” the second “B” Record, “00000004” and so on through
// the final record of the file, the “F” Record.
RecordSequenceNumber int `json:"record_sequence_number" validate:"required"`
// Required. If the software used to produce this file was provided by
// a vendor or produced in-house, enter the appropriate code from the
// table below.
// V: Software was purchased from a vendor or other source.
// I: Software was produced by in-house programmers.
VendorIndicator string `json:"vendor_indicator" validate:"required"`
// Required. Enter the name of the company from whom the software
// was purchased. If the software is produced in-house, enter blanks
VendorName string `json:"vendor_name" validate:"required"`
// Required. Enter the mailing address. If the software is produced
// in-house, enter blanks.
// For U.S. address, the payer city, state, and ZIP Code must be
// reported as a 40-, 2-, and 9-position field, respectively. Filers must
// adhere to the correct format for the payer city, state, and ZIP Code.
// For foreign address, filers may use the payer city, state, and ZIP
// Code as a continuous 51-position field. Enter information in the
// following order: city, province or state, postal code, and the name of
// the country. When reporting a foreign address, the Foreign Entity
// Indicator in position 29 must contain a “1” (one).
VendorMailingAddress string `json:"vendor_mailing_address" validate:"required"`
// Required. Enter the city, town, or post office. If the software is
// produced in-house, enter blanks.
VendorCity string `json:"vendor_city" validate:"required"`
// Required. Enter U.S. Postal Service state abbreviation.
VendorState string `json:"vendor_state" validate:"required"`
// Required. Enter the valid nine-digit ZIP Code assigned by the U.S.
// Postal Service. If only the first five digits are known, fill unused
// positions with blanks. Left justify. If the software is produced inhouse, enter blanks.
VendorZipCode string `json:"vendor_zip_code" validate:"required"`
// Required. Enter the name of the person to contact concerning
// software questions. If the software is produced in-house, enter
// blanks.
VendorContactName string `json:"vendor_contact_name" validate:"required"`
// Required. Enter the telephone number of the person to contact
// concerning software questions. Omit hyphens. If no extension is
// available, left justify the information and fill unused positions with
// blanks. If the software is produced in-house, enter blanks.
VendorContactTelephoneNumber string `json:"vendor_contact_telephone_and_ext" validate:"required"`
// Enter “1” (one) if the vendor is a foreign entity. Otherwise, enter a blank.
VendorForeignEntityIndicator string `json:"vendor_foreign_entity_indicator" validate:"required"`
}
func (*TRecord) SequenceNumber ¶
SequenceNumber returns sequence number of the record
func (*TRecord) SetSequenceNumber ¶
SequenceNumber set sequence number of the record
func (*TRecord) Validate ¶
Validate performs some checks on the record and returns an error if not Validated