Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

HTML code with Javascript inside (Odoo gives error on for loop) / Tried separate .js file (don't know how to import it)

Subscriure's

Get notified when there's activity on this post

This question has been flagged
#OdooV8
1 Respondre
7475 Vistes
Avatar
Bojan


<!DOCTYPE html>

<html lang="mk">

<head>

<meta charset="utf-8" />

<title>Nike sale</title>

<!--[if !IE]><!-->

<link rel="stylesheet" href="/css/main.css" />

<!--<![endif]-->

<!--[if gte IE 7]>

<link rel="stylesheet" type="text/css" href="/css/main.css" media="screen, projection" />

<![endif]-->

<!--[if IE 6]>

<link rel="stylesheet" type="text/css" href="http://universal-ie6-css.googlecode.com/files/ie6.0.3.css" media="screen, projection" />

<![endif]-->

<style>

.tabela { /* Body / Position and size */

width: 85%;

margin-left: auto;

margin-right: auto;

}

#tabelaFooter { /* Footer / Position and size */

padding-top: 5%;

width: 85%;

margin-left:auto;

margin-right:auto;

}

.outline { /* Line */

outline: thin solid black;

}

#metaProdavac td { /* Header / Seller Adress */

padding-top: 2%;

}

#naslov { /* Header / Title, position and size */

font-size: 40px;

padding-top: 4%;

}

.span {

padding-right: 20px;

text-align: right;

padding-top: 0;

padding-bottom: 0;

}

#spacing td {

padding-top: 1%;

}

#footer { text-align: center; }

#footer ul { list-style: none;}

#footer li {

display: inline;

padding-right: 40px;

}

</style>

</head>

<body onload="presmetka()">

<!-- Header table -->

<table class="tabela">

<tr>

<td> <img src="D:\Bojan\Neotel_logo.png" width="100" height="50" alt="Try other source"/> </td>

<td colspan="5" style="text-align: right"> <h3>Neotel Company - Skopje</h3> </td>

</tr>

<tr class="outline"> </tr> <!-- Linija -->

<tr id="metaProdavac">

<td style="vertical-align: text-top">Примач - Nike</td> <td></td> <td></td>

<td width="20%"> <address><strong>Продавач:</strong><br/>Бојан Ѓорески<br/>

Коста Новаковиќ бр. 6<br/>Скопје<br/>Македонија</address> </td>

</tr>

<tr> <td id="naslov">Интернет Услуги</td> </tr>

<tr> <td style="padding-top: 2%">Invoice data</td> </tr>

<tr> <td style="padding-bottom: 1%">08.21.2015</td> </tr>

</table>

<!-- Body table -->

<table class="tabela">

<tr id="spacing">

<td><strong>Опис</strong> </td>

<td class="span"> <strong>Количина</strong> </td>

<td class="span"> <strong>Единечна цена</strong> </td>

<td class="span"> <strong>Данок</strong> </td>

<td class="span"> <strong>Цена со Данок</strong> </td>

</tr>

<tr class="outline"> </tr> <!-- Line -->

<tr>

<td>[350] Интернет пакет – Net Basic на 3 години</td>

<td class="span"> <p class="kolicina">1</p> </td>

<td class="span"> <p class="cena">690.956</p> </td>

<td class="span">18%</td>

<td class="span"> <p class="print"></p> </td>

</tr>

<tr>

<td>[350] Интернет пакет – Net Basic на 2 години</td>

<td class="span"> <p class="kolicina">5</p> </td>

<td class="span"> <p class="cena">590</p> </td>

<td class="span">18%</td>

<td class="span"> <p class="print"></p> </td>

</tr>

<tr>

<td>[350] Интернет пакет – Net Basic на 1 година</td>

<td class="span"> <p class="kolicina">2</p> </td>

<td class="span"> <p class="cena">490</p> </td>

<td class="span">18%</td>

<td class="span"> <p class="print"></p> </td>

</tr>

<tr>

<td>[350] Интернет пакет – Net Basic на 5 години</td>

<td class="span"> <p class="kolicina">1</p> </td>

<td class="span"> <p class="cena">1000</p> </td>

<td class="span">18%</td>

<td class="span"> <p class="print"></p> </td>

</tr>

</table>

<!-- Total table -->

<table style="padding-right: 7.5%;" align="right">

<tr>

<td colspan="3"> <!-- Line -->

<svg width="100%" height="5%">

<line x1="0" y1="0" x2="100%" y2="0" style="stroke:rgb(0,0,0);stroke-width:3" />

</svg>

</td>

</tr>

<tr>

<td> <strong>Тотално без даноци</strong> </td>

<td class="span" id="zbirBezDDV"></td>

</tr>

<tr>

<td colspan="3"> <!-- Line -->

<svg width="100%" height="5%">

<line x1="0" y1="0" x2="100%" y2="0" style="stroke:rgb(0,0,0);stroke-width:1" />

</svg>

</td>

</tr>

<tr>

<td> <strong>Данок</strong> </td>

<td class="span" id="DDV"></td>

</tr>

<tr>

<td colspan="3"> <!-- Line -->

<svg width="100%" height="5%">

<line x1="0" y1="0" x2="100%" y2="0" style="stroke:rgb(0,0,0);stroke-width:3" />

</svg>

</td>

</tr>

<tr>

<td> <strong>Тотално</strong> </td>

<td class="span" id="zbirSoDDV"></td>

</tr>

</table>

<!-- Footer table -->

<table id="tabelaFooter">

<tr class="outline"> <!-- Linija --> </tr> <!-- Linija -->

<tr>

<td id="footer">

<ul>

<li>Email: info@neodata.com</li>

<li>Website: <a href="http://www.neodata.com.mk/en_US/" target="_blank">

http://www.neodata.com.mk </a></li>

</ul>

</td>

</tr>

</table>

<p id="test"></p>

<script>

function presmetka() {

var i,

bezDDV = 0, //Total without tax

posrednik = [], //intermediary for - Individual price with tax

total = [], //Individualna cena so DDV

list = document.getElementsByClassName("cena"), //Array for price elements

quantity = document.getElementsByClassName("kolicina"); //Array for quantity elements

for (i=0; i<list.length; i++) {

posrednik[i] = (parseInt(quantity[i].innerHTML))*(parseFloat(list[i].innerHTML) *

18/100 + parseFloat(list[i].innerHTML));

total = document.getElementsByClassName("print");

total[i].innerHTML = parseFloat(posrednik[i]).toFixed(2);

bezDDV += parseInt(quantity[i].innerHTML) * parseFloat(list[i].innerHTML)

}

document.getElementById("zbirBezDDV").innerHTML = parseFloat(bezDDV).toFixed(2); //Total price, no tax (Rounded to 2 decimal places)

document.getElementById("DDV").innerHTML = parseFloat(bezDDV * 0.18).toFixed(2); //Tax of total price (Rounded to 2 decimal places)

document.getElementById("zbirSoDDV").innerHTML = Math.round(bezDDV + (bezDDV * 0.18)); //Total price with tax (Rounded to an integer)

}

</script>

</body>

</html>

1
Avatar
Descartar
Avatar
Bojan
Autor Best Answer

Found the solution, for those having the same problem. My '<' - smaller than & '>' - greater than signs (in the for loop) were seen as tags. So i changed them to their entities < = &lt; and > = &gt;

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
i want to print this graph view but i don't know how can i done
#OdooV8 qweb-report
Avatar
0
d’abr. 24
1208
Inherit view problem Solved
#odoo #OdooV8
Avatar
Avatar
Avatar
5
de febr. 17
6849
please i want to print the graph view but i don't know how can i done
#OdooV8 #report #qweb
Avatar
0
d’abr. 24
1335
is Posiflex printers compatible with PosBox?
#PosBox #Posiflex #OdooV8
Avatar
0
de març 15
6402
Odoo v8.0 won't show me select list into form (one2many field) Solved
#python #xml #odoo #OdooV8
Avatar
Avatar
1
de maig 18
5870
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now