Pri sklicevanju na 30. clen je na racunu napisana tudi drzava

This commit is contained in:
pero1203 2021-01-19 11:13:17 +01:00
parent 06427b9460
commit b685f0518c
2 changed files with 28 additions and 18 deletions

View File

@ -112,27 +112,35 @@ function ustvariPredracun($api,$podatki,$lang='si') {
); );
} }
// Pri sklicevanju na 30. clen mora na racunu pisati drzava
$country = ($podatki['podjetjeime'] == "" && $podatki['ddv'] != 1) ? $podatki['drzava'] : '';
// dodaj partnerja // dodaj partnerja
$r = $api->assurePartner(array( $r = $api->assurePartner(
'name' => $arr['name'], array(
'street' => $arr['street'], 'name' => $arr['name'],
'postal' => $arr['postal'], 'street' => $arr['street'],
'city' => $arr['city'], 'postal' => $arr['postal'],
'vatid' => $arr['vatid'], 'city' => $arr['city'],
'phone' => $podatki['telefon'], 'vatid' => $arr['vatid'],
'website' => '', 'phone' => $podatki['telefon'],
'email' => $podatki['email'], 'website' => '',
'notes' => '', 'email' => $podatki['email'],
'vatbound' => $vatbound, 'notes' => '',
'custaddr' => '', 'vatbound' => $vatbound,
'payment_period' => 1, 'custaddr' => '',
'street2' => '', 'payment_period' => 1,
'country' => '') 'street2' => '',
'country' => $country
)
); );
if ($r->isOk()) { // partner ustrezno dodan // partner ustrezno dodan
if ($r->isOk()) {
$clientIdA = $r->getData(); $clientIdA = $r->getData();
$clientId=0; $clientId=0;
if(isset($clientIdA[0]['id'])) if(isset($clientIdA[0]['id']))
$clientId = $clientIdA[0]['id']; $clientId = $clientIdA[0]['id'];

View File

@ -181,6 +181,8 @@ class UserNarocilaCebelica{
'telefon' => $this->narocilo['phone'], 'telefon' => $this->narocilo['phone'],
'drzava' => $this->narocilo['podjetje_drzava'],
'podjetjeime' => $this->narocilo['podjetje_ime'], 'podjetjeime' => $this->narocilo['podjetje_ime'],
'podjetjenaslov'=> $this->narocilo['podjetje_naslov'], 'podjetjenaslov'=> $this->narocilo['podjetje_naslov'],
'podjetjepostna'=> $this->narocilo['podjetje_postna'], 'podjetjepostna'=> $this->narocilo['podjetje_postna'],