Merge branch 'master' of https://source.hesabix.ir/morrning/hesabixCore
This commit is contained in:
commit
b477bd47fa
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
namespace App\Cog;
|
||||
|
||||
use App\Entity\Hook;
|
||||
use App\Entity\Business;
|
|
@ -1198,12 +1198,20 @@ class TaxSettingsController extends AbstractController
|
|||
$personType = 2;
|
||||
}
|
||||
|
||||
$InvoiceType = 2;
|
||||
$invoicePayType = null;
|
||||
|
||||
if ($buyerNationalId && $buyerEconomicCode) {
|
||||
$InvoiceType = 1;
|
||||
$invoicePayType = 1;
|
||||
}
|
||||
|
||||
$dateTime = new DateTime();
|
||||
$header = (new \SnappMarketPro\Moadian\Dto\InvoiceHeaderDto())
|
||||
->setTaxid($moadian->generateTaxId($dateTime, $internalId))
|
||||
->setIndati2m($dateTime->getTimestamp() * 1000)
|
||||
->setIndatim($dateTime->getTimestamp() * 1000)
|
||||
->setInty(2)
|
||||
->setInty($InvoiceType)
|
||||
->setInno($moadian->normalizeInvoiceNumber($internalId))
|
||||
->setIrtaxid(null)
|
||||
->setInp(1)
|
||||
|
@ -1227,7 +1235,7 @@ class TaxSettingsController extends AbstractController
|
|||
->setTvam($totalTax)
|
||||
->setTodam($data['shippingCost'])
|
||||
->setTbill($data['finalTotal'])
|
||||
->setSetm(null)
|
||||
->setSetm($invoicePayType)
|
||||
->setCap(null)
|
||||
->setInsp(null)
|
||||
->setTvop(null)
|
||||
|
|
|
@ -589,7 +589,7 @@ export default {
|
|||
if (response.data.success) {
|
||||
Swal.fire({
|
||||
title: 'ارسال موفق',
|
||||
text: 'فاکتور بدون اطلاعات خریدار به سامانه مودیان مالیاتی ارسال شد',
|
||||
text: 'فاکتور به سامانه مودیان مالیاتی ارسال شد',
|
||||
icon: 'success',
|
||||
confirmButtonText: 'باشه'
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue