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
$r = $api->assurePartner(array(
'name' => $arr['name'],
'street' => $arr['street'],
'postal' => $arr['postal'],
'city' => $arr['city'],
'vatid' => $arr['vatid'],
'phone' => $podatki['telefon'],
'website' => '',
'email' => $podatki['email'],
'notes' => '',
'vatbound' => $vatbound,
'custaddr' => '',
'payment_period' => 1,
'street2' => '',
'country' => '')
$r = $api->assurePartner(
array(
'name' => $arr['name'],
'street' => $arr['street'],
'postal' => $arr['postal'],
'city' => $arr['city'],
'vatid' => $arr['vatid'],
'phone' => $podatki['telefon'],
'website' => '',
'email' => $podatki['email'],
'notes' => '',
'vatbound' => $vatbound,
'custaddr' => '',
'payment_period' => 1,
'street2' => '',
'country' => $country
)
);
if ($r->isOk()) { // partner ustrezno dodan
// partner ustrezno dodan
if ($r->isOk()) {
$clientIdA = $r->getData();
$clientId=0;
$clientId=0;
if(isset($clientIdA[0]['id']))
$clientId = $clientIdA[0]['id'];

View File

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