Download & Extend

Scripting error, can't add invoice items

Project:Invoice
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:P.Vogelaar
Status:closed (fixed)

Issue Summary

I'm not able to add invoice items in IE 7 (win xp), getting a javascript error that says that a identifier, string or integer is expected.

function invoice_set_template(value) {
  $.get("http://"+Drupal.settings['invoice']['host']+Drupal.settings['basePath']+"invoice/set/template",
    { value: value,
    },

Comments

#1

Category:bug report» support request

#2

Assigned to:Anonymous» P.Vogelaar

Thanks, I will look into it! I develop under Ubuntu so I work a lot with firefox and epiphany browser, that works perfectly. But when I test it now in Opera under Ubuntu, I see that although I don't get an error, nothing happens when I click "Add item". I hope to fix this for firefox, opera, safari, ie6 and ie7 tomorrow.

#3

Status:active» fixed

Okay, fixed it! The fix is now included in the development version.

Ie7, opera and probably also ie6 don't like Javascript like:

$.get("http://"+Drupal.settings['invoice']['host']+Drupal.settings['basePath']+"invoice/set/template",
{ value: value,
},

I replaced it with:

$.get("http://"+Drupal.settings['invoice']['host']+Drupal.settings['basePath']+"invoice/set/template",
{ value: value
},

I removed the comma after "value: value". Firefox didn't bother about that.

Pieter

#4

To correct something I set in my previous comment "Okay, fixed it! The fix is now included in the development version."

Some comment I gave to my latest commit:

"Since I made a development snapshot on 2 august 2008 I kept comitting to CVS HEAD. Yesterday I noticed that the date of the development snapshot still remained 2 august 2008 however I made changes. Now I figured out since I created a development branch DRUPAL-6--1 that I have to checkout that branch and add and commit my code to that branch. The development snapshot will now be updated within 12 hours if my assumptions are right."

So it's clearly not included in the development version of 2 august 2008, but will be in it very soon.

--project followup subject--

Automatically closed -- issue fixed for two weeks with no activity.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

#6

I can't add items to an invoice.

When i click add item in the Invoice Items section nothing happens. When I try to press save at the bottom instead I get the error "You have to fill in at least one invoice item!" with a red box around the item description text box. Still pressing Add Item button does nothing

Using Ubuntu 8.10, Firefox 3

#7

Is Javascript enabled?

#8

Javascript enabled in the latest versions Firefox, Opera and IE under Windows XP - doesn't work... Any suggestions? Besides migrating to Ubuntu, cause I can't do that on my business PC. Thanks for the info!!

#9

Do you use version 1.0 of the invoice module?

#10

Hey

I am also having this problem.

Has anyone came up with a fix as I really would like to use this.

Thanks

Chris,

#11

Status:closed (fixed)» active

#12

Do you have Clean Urls on?

Pieter

#13

Pieter

I do not have clean URLS on, would you like me to test with it on?

Many Thanks

Chris,

#14

Does the same thing under safari 4 in OSX 10.6

#15

@kippi Yeah, I think that with clean urls on it will work..

#16

Great!! Works great now!!

Now need to find away to assgin a invoice to a user/email and some kind of payment.

Thanks guys

Kippi.

#17

Status:active» closed (fixed)

#18

works not for me, can't add items @ invoice creation - clean urls on - any browser - javascript on - version 6.x-1.0

strange...

#19

...using open atrium

#20

Priority:normal» critical
Status:closed (fixed)» active

I'm having the same issue as segments using Invoice in every browser with javascript on with clean urls with Open Atrium and can not add "Invoice items"

#21

Do you have any javascript errors for me? Please use the console with firebug or something to debug....

Pieter

#22

Category:support request» bug report

#23

This happens when clean URL is not enabled for me ..
I made temporary work by adding ?q= in invoice.js file.

Deepak

#24

Version:6.x-1.0-rc2» 6.x-1.x-dev
Status:active» closed (fixed)

The problem is fixed in the development version now.

I will release version 6.x-1.1 this weekend.

Pieter