Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jpic

Pages: [1]
1
Applications / Re: I realy need spreadsheet
« on: January 27, 2010, 09:28:36 am »
Also: http://plugins.jquery.com/project/sheet

Something that would be great is OpenOffice (soffice) server support for document conversion

2
Applications / Re: Billing
« on: January 27, 2010, 09:26:00 am »
I don't know when that is going to be:(

Right, it seems i can't go further without budget until march. It would be nice if another programmer would contribute a day or two on this or another solution (click "fork" on github).

3
Applications / Re: Billing
« on: November 26, 2009, 07:13:35 am »
It is better to wait for the next version, please.

4
Applications / Re: Billing
« on: November 22, 2009, 02:17:31 pm »
I understand how to fix the invoice and email contact problem, for new clients.

How do you suggest to find the OpenGoo company or contact for existing BI clients? That's all i need to know then i can fix old relations ...

5
Applications / Re: Billing
« on: November 22, 2009, 02:06:35 pm »
Quote
I tried creating a new contact called mister client and put as his email, foo@ba2r.com.

Thanks for testing and giving feedback! I really appreciate.

About update OpenGoo company or contacts database, it is useful to set "tax class" and "tax code" from BI, so that might not be something you want to deactivate after all.

Quote
Also, what will this do with existing clients/invoices in bamboo?
It doesn't make any change in Bamboo database.

Quote
As in, as soon as I implement this patch, will I have duplicates because I had manually created the same people in bamboo before and invoices for them.
You will not see BI clients at all anymore, so there should be no duplicate. Relations between clients and invoices should be broken because "id" of OG companies/contacts is not the same as the "id" of BI clients. Don't worry, invoices is the objective of the next version.

Quote
It didn't copy his email over to bamboo.
There is no email field in BI clients... Only in BI clientcontact.

Where do you put client email in BI? (url)
How many BI clients and BI clientcontacts do you have approximately?

6
Applications / Re: Billing
« on: November 22, 2009, 07:50:31 am »
Derek Allard kindly uploaded BambooInvoice sources on github which makes it easier to hack the fork.

Writing on OpenGoo table can be disabled with version b2c0.1, feel free to consult the complete changelog.

Consider the full documentation on http://github.com/jpic/BambooInvoice/tree/b2c0.1.

7
Applications / Re: Billing
« on: November 20, 2009, 12:27:08 pm »
My bad, i wasn't very clear.

The first version posted as a patch inside the forum post on November 19 only supports OG companies to be used for BI clients.

The second version posted as a link in the forum post on November 20 supports using OG companies and clients for the BI clients. Additionnaly, it supports 2-way updating in a way that looks safe to me.

Feel free to try the second version online with the demo credentials provided, and report bugs or see if it fits your needs or not - it's open source.

Again, thanks Capitan for your help  8)

8
Applications / Re: Billing
« on: November 20, 2009, 06:17:28 am »
I appreciate the patch, but I think a lot of people do not use each entry as a company.
True for b2c, this version supports billing individuals as a company.

Each contact is not a company.  I think many people would not have every single contact as a different "company."  What could we do?
Actually i just did this as an exercise to evaluate BambooInvoice; we only do b2b so we never bill contacts although this version supports it.

http://pub.ocpsys.com/opengoo/bamboo_b2c/bamboo_system_files/application/models/clients_model.txt

But it looks better to consider a simple bridge design for b2b: OG companies for BI clients, and OG contacts for BI contacts.

Also, the SQL might break OpenGoo. So i'm unsure that we can have a unique in object_properties table with columns rel_object_id, rel_object_manager, name. Try it out on:
http://goo.ocpsys.com/ user: jpic pass: demo
http://boo.ocpsys.com/ user:demo@example.com pass: demo

For instance, myself, I have a workspace called "Clients" with all of the subworkspaces for different clients, etc.  The clients workspace has all the contacts I have.
In that case, joinning tables project_contacts and project_companies looks trivial to implement.
I'm running out of free time, i'll implement next time.

In any case, Capitan, thanks for your input. If you don't mind, please elaborate more next time.

9
Applications / Re: Billing
« on: November 19, 2009, 03:36:40 pm »
Simple patch to make BambooInvoice use OpenGoo companies for contacts. Replace "og_" with your OpenGoo table names prefix.

Code: [Select]
diff --git a/bamboo_system_files/application/models/clients_model.php b/bamboo_system_files/application/models/clients_model.php
index fc6da08..939db6c 100755
--- a/bamboo_system_files/application/models/clients_model.php
+++ b/bamboo_system_files/application/models/clients_model.php
@@ -26,8 +26,32 @@ class clients_model extends Model {
 //                     $companies[$company->id] = $company->name;
 //             }
 
+        // goodified
+        return $this->db->query( '
+            select
+                ogc.id,
+                ogc.name,
+                ogc.address as address1,
+                ogc.address2 as address2,
+                ogc.city,
+                ogc.state as province,
+                ogc.zipcode as postal_code,
+                ogc.country as country,
+                ogc.homepage as website,
+                ogc.notes as client_notes,
+                ogts.value as tax_status,
+                ogtc.value as tax_code
+            from og_companies as ogc
+            left join (
+                    select * from og_object_properties where name="tax_status"
+                ) ogts on ogts.rel_object_id = ogc.id
+            left join (
+                    select * from og_object_properties where name="tax_code"
+                ) ogtc on ogtc.rel_object_id = ogc.id
+        ' );
+
+        // Originnal code
                $this->db->orderby('name', 'asc');
-
                return $this->db->get('clients');
        }
 
@@ -35,6 +59,30 @@ class clients_model extends Model {
 
        function get_client_info($id, $fields = '*')
        {
+        // goodified
+        return $this->db->query( '
+            select
+                ogc.id,
+                ogc.name,
+                ogc.address as address1,
+                ogc.address2 as address2,
+                ogc.city,
+                ogc.state as province,
+                ogc.zipcode as postal_code,
+                ogc.country as country,
+                ogc.homepage as website,
+                ogc.notes as client_notes,
+                ogts.value as tax_status,
+                ogtc.value as tax_code
+            from og_companies as ogc
+            left join (
+                    select * from og_object_properties where name="tax_status"
+                ) ogts on ogts.rel_object_id = ogc.id
+            left join (
+                    select * from og_object_properties where name="tax_code"
+                ) ogtc on ogtc.rel_object_id = ogc.id
+            where ogc.id = ' . intval( $id ) )->row(  );
+
                $this->db->select($fields);
                $this->db->where('id', $id);

Add "tax_code" and "tax_status" properties to OpenGoo company objects.
Then apply in bamboo invoice root with command `patch -P1 < /path/to/patch`

Pages: [1]