mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Clean up for einvoicing
This commit is contained in:
parent
be612db0b4
commit
2cc5fa4376
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\DataMapper\EDoc;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
|
||||
use App\DataMapper\EDoc\FatturaPA\FatturaElettronicaHeader;
|
||||
use App\DataMapper\EDoc\FatturaPA\FatturaElettronicaBody;
|
||||
|
||||
|
||||
// minimum required fields
|
||||
// public string $RegimeFiscale = 'RF01',
|
||||
// public string $TipoDocumento = 'TD01',
|
||||
// public string $ModalitaPagamento = 'MP01',
|
||||
// public string $CondizioniPagamento = 'TP02',
|
||||
|
||||
class FatturaPA extends Data
|
||||
{
|
||||
public FatturaElettronicaHeader $FatturaElettronicaHeader;
|
||||
public FatturaElettronicaBody $FatturaElettronicaBody;
|
||||
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -13,17 +13,17 @@ namespace App\DataMapper;
|
||||
|
||||
use Spatie\LaravelData\Data;
|
||||
use Spatie\LaravelData\Optional;
|
||||
use App\DataMapper\EDoc\FatturaPA;
|
||||
use Invoiceninja\Einvoice\Models\FatturaPA\FatturaElettronica;
|
||||
|
||||
class EDocSettings extends Data
|
||||
{
|
||||
public FatturaPA|Optional $FatturaPA;
|
||||
public FatturaElettronica|Optional $FatturaElettronica;
|
||||
|
||||
public function __construct() {}
|
||||
|
||||
public function createFatturaPA(): FatturaPA
|
||||
public function createFatturaPA(): FatturaElettronica
|
||||
{
|
||||
return $this->FatturaPA ??= new FatturaPA();
|
||||
return $this->FatturaElettronica ??= new FatturaElettronica;
|
||||
}
|
||||
|
||||
}
|
@ -11,9 +11,9 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\DataMapper\EDoc\Schema\RO;
|
||||
use App\Utils\Statics;
|
||||
use Illuminate\Http\Response;
|
||||
use InvoiceNinja\Einvoice\Decoder\Schema;
|
||||
|
||||
class StaticController extends BaseController
|
||||
{
|
||||
@ -61,9 +61,8 @@ class StaticController extends BaseController
|
||||
|
||||
if(request()->has('einvoice')){
|
||||
|
||||
$ro = new RO;
|
||||
|
||||
$response_data['einvoice_schema'] = $ro();
|
||||
$schema = new Schema();
|
||||
$response_data['einvoice_schema'] = $schema('FACT1');
|
||||
}
|
||||
|
||||
return response()->json($response_data, 200, ['Content-type' => 'application/json; charset=utf-8'], JSON_PRETTY_PRINT);
|
||||
|
8
composer.lock
generated
8
composer.lock
generated
@ -4980,12 +4980,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/invoiceninja/einvoice.git",
|
||||
"reference": "45267d11cf1e944b555445fbb7f2b8354a7ebeae"
|
||||
"reference": "aec5dc1c1492151cb0cc4bcb7f58be7609bc7e3b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/45267d11cf1e944b555445fbb7f2b8354a7ebeae",
|
||||
"reference": "45267d11cf1e944b555445fbb7f2b8354a7ebeae",
|
||||
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/aec5dc1c1492151cb0cc4bcb7f58be7609bc7e3b",
|
||||
"reference": "aec5dc1c1492151cb0cc4bcb7f58be7609bc7e3b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -5021,7 +5021,7 @@
|
||||
"source": "https://github.com/invoiceninja/einvoice/tree/main",
|
||||
"issues": "https://github.com/invoiceninja/einvoice/issues"
|
||||
},
|
||||
"time": "2024-05-18T07:27:43+00:00"
|
||||
"time": "2024-05-18T12:20:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "invoiceninja/inspector",
|
||||
|
Loading…
x
Reference in New Issue
Block a user