update for Moadian Plugin
This commit is contained in:
parent
8e8ea18ec9
commit
300d802ee8
|
@ -1162,6 +1162,22 @@ class TaxSettingsController extends AbstractController
|
|||
$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();
|
||||
$header = (new \SnappMarketPro\Moadian\Dto\InvoiceHeaderDto())
|
||||
->setTaxid($moadian->generateTaxId($dateTime, $internalId))
|
||||
|
@ -1174,8 +1190,8 @@ class TaxSettingsController extends AbstractController
|
|||
->setIns(1)
|
||||
->setTins($taxId)
|
||||
->setTob(1)
|
||||
->setBid(null)
|
||||
->setTinb(null)
|
||||
->setBid($buyerNationalId)
|
||||
->setTinb($buyerEconomicCode)
|
||||
->setSbc(null)
|
||||
->setBpc(null)
|
||||
->setBbc(null)
|
||||
|
|
Loading…
Reference in a new issue