+ Post New Thread
Page 4 of 20 FirstFirst 1234567814 ... LastLast
Results 46 to 60 of 287
How do you do....it? Thread, Toner inventory Database in Technical; SmaraitanCollege: The error seems to lead to a non-configured timezone in your php.ini file. Edit your php.ini and check the ...
  1. #46

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,403
    Thank Post
    638
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319
    SmaraitanCollege: The error seems to lead to a non-configured timezone in your php.ini file. Edit your php.ini and check the "date.timezone" line. Set it to:

    Code:
    date.timezone = "Europe/London"
    Make sure there isn't a semicolon before it. Your php.ini file could be in one of several places - c:\windows\php.ini or c:\php\php.ini are the most likely places though.

  2. Thanks to webman from:

    SmaraitanCollege (1st October 2010)

  3. #47

    Join Date
    May 2009
    Location
    Whyalla, South Australia
    Posts
    16
    Thank Post
    3
    Thanked 3 Times in 3 Posts
    Rep Power
    11
    That's the ticket! Thanks alot for your prompt response!

    I put my local timezone in rather than London (Australia/Adelaide) and it works a treat. I'm telling you, this is infinitely better than our old system of having a table ruled up on the whiteboard and having to remember to update it when you go out to change a toner!

    Thanks again.

  4. Thanks to SmaraitanCollege from:

    webman (1st October 2010)

  5. #48
    Sirbendy's Avatar
    Join Date
    Nov 2005
    Posts
    2,298
    Thank Post
    8
    Thanked 202 Times in 153 Posts
    Rep Power
    109
    I'm getting the following error, trying to add a manufacturer...

    "Uncaught fProgrammerException
    -----------------------------
    {doc_root}\cartman\manufacturers.php(39): include('{doc_root}\cartman\...')
    {doc_root}\cartman\views\manufacturers\index.php(3 0): Manufacturer->countModels()
    [internal function]: fActiveRecord->__call('countModels', Array)
    {doc_root}\cartman\inc\flourish\fActiveRecord.php( 923): fORMRelated::countRecords('Manufacturer', Array, Array, 'Model')
    {doc_root}\cartman\inc\flourish\fORMRelated.php(29 0): fORMSchema::getRouteName(Object(fSchema), 'manufacturers', 'models', NULL, '*-to-many')
    {doc_root}\cartman\inc\flourish\fORMSchema.php(179 )
    The table manufacturers is not in a *-to-many relationship with the table models"

    Server is Uniform Portable 4.4, Running on Vistargh, Apache 2.2.13, PHP 5.3.0 DAV/2, SQL version 5.0.5 - DEV - 081106..

    Any ideas?

    Edit: Hang fire, it looks like Uniform 4.4 doesn't support InnoDB..

    EDIT: Oh yes it does. Edited My.cnf, enabled InnoDB engine, restarted Apache and MySQL, reran the SQL query, and she runs! YIPPEE!
    Last edited by Sirbendy; 1st October 2010 at 01:34 PM.

  6. #49
    gumbygaz's Avatar
    Join Date
    Nov 2009
    Location
    Staffordshire
    Posts
    94
    Thank Post
    79
    Thanked 14 Times in 13 Posts
    Rep Power
    12
    Got this working, and it's very impressive indeed. So huge thanks for sharing! Going to have a tweak and see if I can incorporate some costing to it, but it's a complicated issue as we've got different suppliers & costs each time. May just have it pop up and ask for the Price & Toner (as we have this written on each toner) when clicking on the toner allocation and add the information into the reports table...

    But loving it, cheers!!

  7. Thanks to gumbygaz from:

    webman (1st October 2010)

  8. #50

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,345
    Thank Post
    625
    Thanked 1,584 Times in 1,421 Posts
    Rep Power
    414
    Webman: awesome work, how about recording the page count when a consumable is replaced so that next time it's replaced and the page count is updated it could tell you how many pages that consumable printed?

    Ben

  9. Thanks to plexer from:

    webman (1st October 2010)

  10. #51

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,403
    Thank Post
    638
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319
    Sirbendy: I did think that it was an InnoDB issue; but thought it wouldn't have imported the .sql file (which specifies the tables should be InnoDB) in the first place if it wasn't there. I guess it just defaulted to MyISAM

    gumbygaz: Thanks. Hopefully the existing code is easy enough to make sense of so you can add your feature.

    plexer: I'll look at that too. This is where SNMP would be very useful! Shame it's such an awful protocol to work with at the developer level

  11. #52
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    Hello Everyone,

    First off my thanks to webman for such a useful tool. I've had a word with my NM and she would like to use it however we do need to keep track of costs before we can do so. (We currently use an excell sheet)

    So here's my 2p's worth

    First of create a 'costs' table with an ID, cost, consumable_id and Effective_from fields (with consumable_id and a forgien key)
    Code:
    CREATE TABLE IF NOT EXISTS `costs` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `cost` decimal(10,2) unsigned NOT NULL DEFAULT '0' COMMENT 'Cost of consumable',
      `consumable_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quantity of consumable in stock',
      `effective_from` datetime NOT NULL COMMENT 'Time of Cost',
      PRIMARY KEY (`id`),
      KEY `consumables` (`consumable_id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Details about the cost of consumables at a given time' AUTO_INCREMENT=0 ;
    
    ALTER TABLE `costs`
      ADD CONSTRAINT  FOREIGN KEY (`consumable_id`) REFERENCES `consumables` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
    Change the `events` table to include a cost_id field
    Code:
    CREATE TABLE IF NOT EXISTS `events` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `printer_id` int(10) unsigned NOT NULL COMMENT 'Printer ID installed in to',
      `consumable_id` int(10) unsigned NOT NULL COMMENT 'Consumable ID installed',
      `date` datetime NOT NULL,
      `cost_id` int(10) unsigned NOT NULL COMMENT 'ID of the Cost',
      PRIMARY KEY (`id`),
      KEY `printerhistory` (`printer_id`),
      KEY `consumablehistory` (`consumable_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Audit history of consumable installation into printers' AUTO_INCREMENT=0 ;
    
    ALTER TABLE `events`
      ADD CONSTRAINT  FOREIGN KEY (`cost_id`) REFERENCES `costs` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
    now when ever you 'install' a cartridge you would have to run the following to work out what cost to use
    Code:
    SELECT `id` FROM `costs` WHERE `consumable_id` = '1' AND effective_from < NOW() ORDER BY `effective_from` DESC LIMIT 1;
    and of course you would have to add a costs field to the add\edit consumable screens and update the `costs` table each time.

    now the catch, I know nothing what so ever about PHP so i can only test this from the cmd line, but what do you think?

  12. #53
    TheScarfedOne's Avatar
    Join Date
    Apr 2007
    Location
    Plymouth, Devon
    Posts
    1,179
    Thank Post
    573
    Thanked 153 Times in 139 Posts
    Blog Entries
    78
    Rep Power
    80
    I cant seem to get a download here at the mo. Looks great though...

  13. #54
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    Well I had some time and decided to try to implement a small extra, Recording what drums are in stock.

    Results are attached; if anyone could give any feedback it would be most welcome.

    .Adam

    PrintMasterAddDrums.zip

  14. Thanks to fawkers from:

    webman (20th October 2010)

  15. #55
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    sorry fokes i think i've missed one line of code in this file since im now getting;

    Code:
    Fatal error: Call to a member function addOneOrMoreRule() on a non-object in D:\Program Files\xampp\xampp\htdocs\printmastertest\consumables.php on line 150
    when adding a drum... grrrrrr i had this dam thing working, i love coding :P

  16. #56

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,403
    Thank Post
    638
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319
    You need this on the line above it:

    Code:
    $validator = new fValidation();
    ( As you have on line 87 )

  17. Thanks to webman from:

    fawkers (21st October 2010)

  18. #57
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    OK here is the corrected version, amazing how one line can drive you nuts!

    AddDrumsandLightCarts.zip

    There is a know fault, once you mark a consumable as one of the new types (drum or light cartridge) you cant remove it as such without editing the table. Cant track down why either.

  19. #58
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,762
    Thank Post
    897
    Thanked 416 Times in 350 Posts
    Blog Entries
    12
    Rep Power
    86
    Many thanks for this, seems to work great.

    Just another request to be able to put in a price for Toners, this would allow us to create a report on how much we spend.
    Last edited by zag; 21st October 2010 at 01:07 PM.

  20. #59
    fawkers's Avatar
    Join Date
    Jun 2007
    Location
    Southend
    Posts
    193
    Thank Post
    32
    Thanked 22 Times in 21 Posts
    Blog Entries
    2
    Rep Power
    31
    hi zag,

    As per my post #52 the implementation on the backend isn't too bad, but i'm a php novice (a whole 48 hours :P) so I might have a better look at it over half term

  21. #60
    bmdixon's Avatar
    Join Date
    Apr 2008
    Location
    Birmingham
    Posts
    253
    Thank Post
    43
    Thanked 57 Times in 38 Posts
    Rep Power
    22
    Just set this up here. Been hacking a login page together and requiring login before being able to access the page, took me a little while but got there now.
    Just noticed a few niggles in Firefox though.... when you click to install a consumable, it shifts the printers down (in line with the bottom of the consumables that appear). also the colour 'dots' on the "add a consumable" page are shown as 'n'?
    Only little things but wondered if they were easy fixes?
    Absolutely loving this though, it's exactly what we needed and saved me trying to hack something together! Thanks!

  22. Thanks to bmdixon from:

    webman (27th October 2010)

SHARE:
+ Post New Thread
Page 4 of 20 FirstFirst 1234567814 ... LastLast

Similar Threads

  1. OCS Inventory
    By Geoff in forum Downloads
    Replies: 5
    Last Post: 3rd June 2011, 08:40 AM
  2. Inventory
    By school in forum Scripts
    Replies: 2
    Last Post: 3rd June 2010, 02:18 PM
  3. Inventory
    By mmoseley in forum Network and Classroom Management
    Replies: 15
    Last Post: 20th June 2007, 12:31 PM
  4. Replies: 4
    Last Post: 28th February 2007, 09:37 AM
  5. inventory system
    By bjg5858 in forum General Chat
    Replies: 2
    Last Post: 11th July 2006, 09:10 AM

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (1 members and 1 guests)

  1. savvasn

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •