update for Moadian Plugin
This commit is contained in:
parent
8e8ea18ec9
commit
300d802ee8
|
@ -1162,6 +1162,22 @@ class TaxSettingsController extends AbstractController
|
||||||
$totalTax += $item['tax'];
|
$totalTax += $item['tax'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$buyerNationalId = null;
|
||||||
|
$buyerEconomicCode = null;
|
||||||
|
|
||||||
|
$buyerPerson = null;
|
||||||
|
foreach ($invoice->getHesabdariRows() as $row) {
|
||||||
|
if ($row->getPerson()) {
|
||||||
|
$buyerPerson = $row->getPerson();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($buyerPerson) {
|
||||||
|
$buyerNationalId = $buyerPerson->getShenasemeli();
|
||||||
|
$buyerEconomicCode = $buyerPerson->getCodeeghtesadi();
|
||||||
|
}
|
||||||
|
|
||||||
$dateTime = new DateTime();
|
$dateTime = new DateTime();
|
||||||
$header = (new \SnappMarketPro\Moadian\Dto\InvoiceHeaderDto())
|
$header = (new \SnappMarketPro\Moadian\Dto\InvoiceHeaderDto())
|
||||||
->setTaxid($moadian->generateTaxId($dateTime, $internalId))
|
->setTaxid($moadian->generateTaxId($dateTime, $internalId))
|
||||||
|
@ -1174,8 +1190,8 @@ class TaxSettingsController extends AbstractController
|
||||||
->setIns(1)
|
->setIns(1)
|
||||||
->setTins($taxId)
|
->setTins($taxId)
|
||||||
->setTob(1)
|
->setTob(1)
|
||||||
->setBid(null)
|
->setBid($buyerNationalId)
|
||||||
->setTinb(null)
|
->setTinb($buyerEconomicCode)
|
||||||
->setSbc(null)
|
->setSbc(null)
|
||||||
->setBpc(null)
|
->setBpc(null)
|
||||||
->setBbc(null)
|
->setBbc(null)
|
||||||
|
|
Loading…
Reference in a new issue