Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

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

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
#OdooV8
1 Rispondi
7538 Visualizzazioni
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
Abbandona
Avatar
Bojan
Autore Risposta migliore

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
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
i want to print this graph view but i don't know how can i done
#OdooV8 qweb-report
Avatar
0
apr 24
1271
Inherit view problem Risolto
#odoo #OdooV8
Avatar
Avatar
Avatar
5
feb 17
6917
please i want to print the graph view but i don't know how can i done
#OdooV8 #report #qweb
Avatar
0
apr 24
1410
is Posiflex printers compatible with PosBox?
#PosBox #Posiflex #OdooV8
Avatar
0
mar 15
6470
Odoo v8.0 won't show me select list into form (one2many field) Risolto
#python #xml #odoo #OdooV8
Avatar
Avatar
1
mag 18
5970
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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