mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Refactor e-invoicing to allow more types for quotes, po, ...
This commit is contained in:
parent
17c566bf3b
commit
8fe73e9be9
@ -9,11 +9,11 @@
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Jobs\Invoice;
|
||||
namespace App\Jobs\EInvoice;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Services\Invoice\EInvoice\FacturaEInvoice;
|
||||
use App\Services\Invoice\EInvoice\ZugferdEInvoice;
|
||||
use App\Services\EInvoicing\Standards\FacturaEInvoice;
|
||||
use App\Services\EInvoicing\Standards\ZugferdEInvoice;
|
||||
use App\Utils\Ninja;
|
||||
use horstoeko\zugferd\ZugferdDocumentBuilder;
|
||||
use Illuminate\Bus\Queueable;
|
||||
@ -22,6 +22,7 @@ use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\App;
|
||||
use function App\Jobs\Invoice\app;
|
||||
|
||||
class CreateEInvoice implements ShouldQueue
|
||||
{
|
@ -12,7 +12,7 @@
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use App\Jobs\Invoice\CreateEInvoice;
|
||||
use App\Jobs\EInvoice\CreateEInvoice;
|
||||
use App\Libraries\MultiDB;
|
||||
use App\Models\CreditInvitation;
|
||||
use App\Models\InvoiceInvitation;
|
||||
|
@ -9,7 +9,7 @@
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Services\Invoice\EInvoice;
|
||||
namespace App\Services\EInvoicing\Standards;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Models\PaymentType;
|
@ -9,7 +9,7 @@
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Services\Invoice\EInvoice;
|
||||
namespace App\Services\EInvoicing\Standards;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Services\AbstractService;
|
@ -9,28 +9,28 @@
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Services\Invoice\EInvoice;
|
||||
namespace App\Services\EInvoicing\Standards;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Services\AbstractService;
|
||||
use CleverIt\UBL\Invoice\Address;
|
||||
use CleverIt\UBL\Invoice\ClassifiedTaxCategory;
|
||||
use CleverIt\UBL\Invoice\Contact;
|
||||
use CleverIt\UBL\Invoice\Country;
|
||||
use CleverIt\UBL\Invoice\Generator;
|
||||
use CleverIt\UBL\Invoice\Invoice as UBLInvoice;
|
||||
use CleverIt\UBL\Invoice\InvoiceLine;
|
||||
use CleverIt\UBL\Invoice\Item;
|
||||
use CleverIt\UBL\Invoice\LegalEntity;
|
||||
use CleverIt\UBL\Invoice\LegalMonetaryTotal;
|
||||
use CleverIt\UBL\Invoice\Party;
|
||||
use CleverIt\UBL\Invoice\PayeeFinancialAccount;
|
||||
use CleverIt\UBL\Invoice\PaymentMeans;
|
||||
use CleverIt\UBL\Invoice\Price;
|
||||
use CleverIt\UBL\Invoice\TaxCategory;
|
||||
use CleverIt\UBL\Invoice\TaxScheme;
|
||||
use CleverIt\UBL\Invoice\TaxSubTotal;
|
||||
use CleverIt\UBL\Invoice\TaxTotal;
|
||||
use CleverIt\UBL\Invoice\PaymentMeans;
|
||||
use CleverIt\UBL\Invoice\PayeeFinancialAccount;
|
||||
use CleverIt\UBL\Invoice\LegalEntity;
|
||||
use CleverIt\UBL\Invoice\ClassifiedTaxCategory;
|
||||
use CleverIt\UBL\Invoice\Price;
|
||||
|
||||
class RoEInvoice extends AbstractService
|
||||
{
|
@ -9,7 +9,7 @@
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Services\Invoice\EInvoice;
|
||||
namespace App\Services\EInvoicing\Standards;
|
||||
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Product;
|
@ -11,21 +11,21 @@
|
||||
|
||||
namespace App\Services\Invoice;
|
||||
|
||||
use App\Models\Task;
|
||||
use App\Utils\Ninja;
|
||||
use App\Events\Invoice\InvoiceWasArchived;
|
||||
use App\Jobs\EInvoice\CreateEInvoice;
|
||||
use App\Jobs\Entity\CreateRawPdf;
|
||||
use App\Jobs\Inventory\AdjustProductInventory;
|
||||
use App\Libraries\Currency\Conversion\CurrencyApi;
|
||||
use App\Models\CompanyGateway;
|
||||
use App\Models\Expense;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Models\Subscription;
|
||||
use App\Models\CompanyGateway;
|
||||
use Illuminate\Support\Carbon;
|
||||
use App\Models\Task;
|
||||
use App\Utils\Ninja;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use App\Jobs\Entity\CreateRawPdf;
|
||||
use App\Jobs\Invoice\CreateEInvoice;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\Events\Invoice\InvoiceWasArchived;
|
||||
use App\Jobs\Inventory\AdjustProductInventory;
|
||||
use App\Libraries\Currency\Conversion\CurrencyApi;
|
||||
|
||||
class InvoiceService
|
||||
{
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace App\Services\Pdf;
|
||||
|
||||
use App\Jobs\Invoice\CreateEInvoice;
|
||||
use App\Jobs\EInvoice\CreateEInvoice;
|
||||
use App\Models\Company;
|
||||
use App\Models\CreditInvitation;
|
||||
use App\Models\Invoice;
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Tests\Feature\EInvoice;
|
||||
|
||||
use App\Services\Invoice\EInvoice\FacturaEInvoice;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@ -40,11 +39,11 @@ class FacturaeTest extends TestCase
|
||||
public function testInvoiceGeneration()
|
||||
{
|
||||
|
||||
$f = new FacturaEInvoice($this->invoice, "3.2.2");
|
||||
$f = new \App\Services\EInvoicing\Standards\FacturaEInvoice($this->invoice, "3.2.2");
|
||||
$path = $f->run();
|
||||
|
||||
$this->assertNotNull($f->run());
|
||||
|
||||
|
||||
// nlog($f->run());
|
||||
|
||||
// $this->assertTrue($this->validateInvoiceXML($path));
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace Tests\Feature\EInvoice;
|
||||
|
||||
use App\Services\Invoice\EInvoice\FatturaPA;
|
||||
use App\Services\EInvoicing\Standards\FatturaPA;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||
use Tests\MockAccountData;
|
||||
@ -42,7 +42,7 @@ class FatturaPATest extends TestCase
|
||||
$xml = $fat->run();
|
||||
|
||||
// nlog($xml);
|
||||
|
||||
|
||||
$this->assertnotNull($xml);
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
use App\Jobs\EInvoice\CreateEInvoice;
|
||||
use App\Jobs\Entity\CreateRawPdf;
|
||||
use App\Jobs\Invoice\CreateEInvoice;
|
||||
use horstoeko\zugferd\ZugferdDocumentReader;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||
|
Loading…
Reference in New Issue
Block a user