Minor fixes

This commit is contained in:
David Bomba 2023-04-21 14:40:56 +10:00
parent 7c0498a835
commit 4e5e9c3a16
2 changed files with 75 additions and 77 deletions

View File

@ -192,9 +192,7 @@ class BaseRule implements RuleInterface
public function tax($item = null): self
{
nlog($this->client_region);
nlog($this->seller_region);
if ($this->client->is_tax_exempt) {
return $this->taxExempt();
} elseif($this->client_region == $this->seller_region && $this->isTaxableRegion()) {

View File

@ -28,87 +28,87 @@ class FacturaEInvoice extends AbstractService
// Facturae::SCHEMA_3_2_1 Invoice Format 3.2.1
// Facturae::SCHEMA_3_2_2 Invoice Format 3.2.2
// Facturae::ISSUER_SELLER Provider (issuer)
// Facturae::ISSUER_BUYER Recipient (receiver)
// Facturae::ISSUER_THIRD_PARTY Third
// Facturae::ISSUER_SELLER Provider (issuer)
// Facturae::ISSUER_BUYER Recipient (receiver)
// Facturae::ISSUER_THIRD_PARTY Third
// Facturae::PRECISION_LINE Line level accuracy
// Facturae::PRECISION_INVOICE Invoice level accuracy
// Facturae::PRECISION_LINE Line level accuracy
// Facturae::PRECISION_INVOICE Invoice level accuracy
// CorrectiveDetails::METHOD_FULL Full rectification
// CorrectiveDetails::METHOD_DIFFERENCES Rectification for differences
// CorrectiveDetails::METHOD_VOLUME_DISCOUNT Rectification for discount by volume of operations during a period
// CorrectiveDetails::METHOD_AEAT_AUTHORIZED Authorized by the Tax Agency
// CorrectiveDetails::METHOD_FULL Full rectification
// CorrectiveDetails::METHOD_DIFFERENCES Rectification for differences
// CorrectiveDetails::METHOD_VOLUME_DISCOUNT Rectification for discount by volume of operations during a period
// CorrectiveDetails::METHOD_AEAT_AUTHORIZED Authorized by the Tax Agency
// FacturaePayment::TYPE_CASH Cash
// FacturaePayment::TYPE_DEBIT Domiciled receipt
// FacturaePayment::TYPE_RECEIPT Receipt
// FacturaePayment::TYPE_TRANSFER Transfer
// FacturaePayment::TYPE_ACCEPTED_BILL_OF_EXCHANGE Letter Accepted
// FacturaePayment::TYPE_DOCUMENTARY_CREDIT Letter of credit
// FacturaePayment::TYPE_CONTRACT_AWARD contract award
// FacturaePayment::TYPE_BILL_OF_EXCHANGE Bill of exchange
// FacturaePayment::TYPE_TRANSFERABLE_IOU I will pay to order
// FacturaePayment::TYPE_IOU I Will Pay Not To Order
// FacturaePayment::TYPE_CHEQUE Check
// FacturaePayment::TYPE_REIMBURSEMENT Replacement
// FacturaePayment::TYPE_SPECIAL specials
// FacturaePayment::TYPE_SETOFF Compensation
// FacturaePayment::TYPE_POSTGIRO Money order
// FacturaePayment::TYPE_CERTIFIED_CHEQUE conformed check
// FacturaePayment::TYPE_BANKERS_DRAFT Bank check
// FacturaePayment::TYPE_CASH_ON_DELIVERY Cash on delivery
// FacturaePayment::TYPE_CARD Payment by card
// FacturaePayment::TYPE_CASH Cash
// FacturaePayment::TYPE_DEBIT Domiciled receipt
// FacturaePayment::TYPE_RECEIPT Receipt
// FacturaePayment::TYPE_TRANSFER Transfer
// FacturaePayment::TYPE_ACCEPTED_BILL_OF_EXCHANGE Letter Accepted
// FacturaePayment::TYPE_DOCUMENTARY_CREDIT Letter of credit
// FacturaePayment::TYPE_CONTRACT_AWARD contract award
// FacturaePayment::TYPE_BILL_OF_EXCHANGE Bill of exchange
// FacturaePayment::TYPE_TRANSFERABLE_IOU I will pay to order
// FacturaePayment::TYPE_IOU I Will Pay Not To Order
// FacturaePayment::TYPE_CHEQUE Check
// FacturaePayment::TYPE_REIMBURSEMENT Replacement
// FacturaePayment::TYPE_SPECIAL specials
// FacturaePayment::TYPE_SETOFF Compensation
// FacturaePayment::TYPE_POSTGIRO Money order
// FacturaePayment::TYPE_CERTIFIED_CHEQUE conformed check
// FacturaePayment::TYPE_BANKERS_DRAFT Bank check
// FacturaePayment::TYPE_CASH_ON_DELIVERY Cash on delivery
// FacturaePayment::TYPE_CARD Payment by card
// Facturae::TAX_IVA Value Added Tax
// Facturae::TAX_IPSI Tax on production, services and imports
// Facturae::TAX_IGIC General indirect tax of the Canary Islands
// Facturae::TAX_IRPF Personal Income Tax
// Facturae::TAX_OTHER Other
// Facturae::TAX_ITPAJD Transfer tax and stamp duty
// Facturae::TAX_IE Special taxes
// Facturae::TAX_RA Customs rent
// Facturae::TAX_IGTECM General tax on business traffic that is applied in Ceuta and Melilla
// Facturae::TAX_IECDPCAC Special tax on fuels derived from petroleum in the Autonomous Community of the Canary Islands
// Facturae::TAX_IIIMAB Tax on facilities that affect the environment in the Balearic Islands
// Facturae::TAX_ICIO Tax on constructions, facilities and works
// Facturae::TAX_IMVDN Municipal tax on unoccupied homes in Navarra
// Facturae::TAX_IMSN Municipal tax on plots in Navarra
// Facturae::TAX_IMGSN Municipal tax on luxury expenses in Navarra
// Facturae::TAX_IMPN Municipal tax on advertising in Navarra
// Facturae::TAX_REIVA Special VAT regime for travel agencies
// Facturae::TAX_REIGIC Special IGIC regime: for travel agencies
// Facturae::TAX_REIPSI Special IPSI regime for travel agencies
// Facturae::TAX_IPS Taxes on insurance premiums
// Facturae::TAX_RLEA Surcharge intended to finance the liquidation functions of insurance entities
// Facturae::TAX_IVPEE Tax on the value of electricity production
// Facturae::TAX_IPCNG Tax on the production of spent nuclear fuel and radioactive waste resulting from the generation of nuclear power
// Facturae::TAX_IACNG Tax on the storage of spent nuclear fuel and radioactive waste in centralized facilities
// Facturae::TAX_IDEC Tax on Deposits in Credit Institutions
// Facturae::TAX_ILTCAC Tax on tobacco products in the Autonomous Community of the Canary Islands
// Facturae::TAX_IGFEI Tax on Fluorinated Greenhouse Gases
// Facturae::TAX_IRNR Non-Resident Income Tax
// Facturae::TAX_ISS Corporate tax
// Facturae::TAX_IVA Value Added Tax
// Facturae::TAX_IPSI Tax on production, services and imports
// Facturae::TAX_IGIC General indirect tax of the Canary Islands
// Facturae::TAX_IRPF Personal Income Tax
// Facturae::TAX_OTHER Other
// Facturae::TAX_ITPAJD Transfer tax and stamp duty
// Facturae::TAX_IE Special taxes
// Facturae::TAX_RA Customs rent
// Facturae::TAX_IGTECM General tax on business traffic that is applied in Ceuta and Melilla
// Facturae::TAX_IECDPCAC Special tax on fuels derived from petroleum in the Autonomous Community of the Canary Islands
// Facturae::TAX_IIIMAB Tax on facilities that affect the environment in the Balearic Islands
// Facturae::TAX_ICIO Tax on constructions, facilities and works
// Facturae::TAX_IMVDN Municipal tax on unoccupied homes in Navarra
// Facturae::TAX_IMSN Municipal tax on plots in Navarra
// Facturae::TAX_IMGSN Municipal tax on luxury expenses in Navarra
// Facturae::TAX_IMPN Municipal tax on advertising in Navarra
// Facturae::TAX_REIVA Special VAT regime for travel agencies
// Facturae::TAX_REIGIC Special IGIC regime: for travel agencies
// Facturae::TAX_REIPSI Special IPSI regime for travel agencies
// Facturae::TAX_IPS Taxes on insurance premiums
// Facturae::TAX_RLEA Surcharge intended to finance the liquidation functions of insurance entities
// Facturae::TAX_IVPEE Tax on the value of electricity production
// Facturae::TAX_IPCNG Tax on the production of spent nuclear fuel and radioactive waste resulting from the generation of nuclear power
// Facturae::TAX_IACNG Tax on the storage of spent nuclear fuel and radioactive waste in centralized facilities
// Facturae::TAX_IDEC Tax on Deposits in Credit Institutions
// Facturae::TAX_ILTCAC Tax on tobacco products in the Autonomous Community of the Canary Islands
// Facturae::TAX_IGFEI Tax on Fluorinated Greenhouse Gases
// Facturae::TAX_IRNR Non-Resident Income Tax
// Facturae::TAX_ISS Corporate tax
// FacturaeItem::SPECIAL_TAXABLE_EVENT_EXEMPT Subject and exempt operation
// FacturaeItem::SPECIAL_TAXABLE_EVENT_NON_SUBJECT Operation not subject
// FacturaeItem::SPECIAL_TAXABLE_EVENT_EXEMPT Subject and exempt operation
// FacturaeItem::SPECIAL_TAXABLE_EVENT_NON_SUBJECT Operation not subject
// FacturaeCentre::ROLE_CONTABLE
// eitherFacturaeCentre::ROLE_FISCAL Accounting Office
// FacturaeCentre::ROLE_GESTOR
// eitherFacturaeCentre::ROLE_RECEPTOR managing body
// FacturaeCentre::ROLE_TRAMITADOR
// eitherFacturaeCentre::ROLE_PAGADOR processing unit
// FacturaeCentre::ROLE_PROPONENTE proposing body
// FacturaeCentre::ROLE_B2B_FISCAL Fiscal receiver in FACeB2B
// FacturaeCentre::ROLE_B2B_PAYER Payer in FACeB2B
// FacturaeCentre::ROLE_B2B_BUYER Buyer at FACeB2B
// FacturaeCentre::ROLE_B2B_COLLECTOR Collector at FACeB2B
// FacturaeCentre::ROLE_B2B_SELLER Seller at FACeB2B
// FacturaeCentre::ROLE_B2B_PAYMENT_RECEIVER Payment recipient in FACeB2B
// FacturaeCentre::ROLE_B2B_COLLECTION_RECEIVER Collection receiver in FACeB2B
// FacturaeCentre::ROLE_B2B_ISSUER Issuer in FACeB2B
// FacturaeCentre::ROLE_CONTABLE
// eitherFacturaeCentre::ROLE_FISCAL Accounting Office
// FacturaeCentre::ROLE_GESTOR
// eitherFacturaeCentre::ROLE_RECEPTOR managing body
// FacturaeCentre::ROLE_TRAMITADOR
// eitherFacturaeCentre::ROLE_PAGADOR processing unit
// FacturaeCentre::ROLE_PROPONENTE proposing body
// FacturaeCentre::ROLE_B2B_FISCAL Fiscal receiver in FACeB2B
// FacturaeCentre::ROLE_B2B_PAYER Payer in FACeB2B
// FacturaeCentre::ROLE_B2B_BUYER Buyer at FACeB2B
// FacturaeCentre::ROLE_B2B_COLLECTOR Collector at FACeB2B
// FacturaeCentre::ROLE_B2B_SELLER Seller at FACeB2B
// FacturaeCentre::ROLE_B2B_PAYMENT_RECEIVER Payment recipient in FACeB2B
// FacturaeCentre::ROLE_B2B_COLLECTION_RECEIVER Collection receiver in FACeB2B
// FacturaeCentre::ROLE_B2B_ISSUER Issuer in FACeB2B
public function __construct(public Invoice $invoice)