Eloquent row of the purchase VAT matrix: regime plus nature maps to a VAT code and ledger accounts. Reuse when posting purchase invoices, including reverse-charge cases left to manual VAT entry.
// Source: https://github.com/SMEWebify/WebErpMesv2 | License: LGPL-3.0 | Modified files must remain under LGPL-3.0
// Modifications to this file must remain under LGPL-3.0.
// Provided via justclaw.it.com; keep this notice with the code.
<?php
namespace App\Models\Accounting;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
/**
* Ligne de la matrice de TVA ACHATS : (régime, nature) → code de TVA + comptes.
* `manual_vat` = l'écriture TVA d'autoliquidation est laissée à la saisie manuelle.
*/
class AccountingVatPurchaseRule extends Model
{
use HasFactory;
protected $fillable = [
'vat_regime_id',
'vat_nature_id',
'accounting_vats_id',
'purchase_account',
'vat_account',
'vat_account_a
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key