Pri sklicevanju na 30. clen je na racunu napisana tudi drzava
This commit is contained in:
parent
06427b9460
commit
b685f0518c
@ -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'];
|
||||
|
||||
|
@ -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'],
|
||||
|
Loading…
x
Reference in New Issue
Block a user