Commit 2fd9914b authored by Mohammed Dohadwala's avatar Mohammed Dohadwala

Fixed site_code__pbus join.

parent 3bcdfd01
...@@ -47,95 +47,92 @@ ...@@ -47,95 +47,92 @@
<type size="10">char</type> <type size="10">char</type>
<update>yes</update> <update>yes</update>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>cust_code__dist</name> <key>yes</key>
<dbname>quot_stockist.cust_code__dist</dbname> <name>quot_no</name>
</table_column> <dbname>sales_quot_stockist.quot_no</dbname>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code__stk</name>
<dbname>quot_stockist.cust_code__stk</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="10">char</type> <type precision="0">decimal</type>
<update>yes</update> <update>yes</update>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<key>yes</key> <key>yes</key>
<name>quot_no</name> <name>line_no</name>
<dbname>quot_stockist.quot_no</dbname> <dbname>sales_quot_stockist.line_no</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="10">char</type> <type size="10">char</type>
<update>yes</update> <update>yes</update>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>cust_code</name> <name>cust_code</name>
<dbname>quot_stockist.cust_code</dbname> <dbname>sales_quot_stockist.cust_code</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type precision="0">decimal</type> <type size="10">char</type>
<update>yes</update> <update>yes</update>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<key>yes</key> <name>cust_code__stk</name>
<name>line_no</name> <dbname>sales_quot_stockist.cust_code__stk</dbname>
<dbname>quot_stockist.line_no</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="50">char</type> <type size="10">char</type>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>distributor_name</name> <name>sales_quot_quot_no</name>
<dbname>distributor_name</dbname> <dbname>sales_quot.quot_no</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="50">char</type> <type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>stockist_name</name> <name>cust_code__dist</name>
<dbname>stockist_name</dbname> <dbname>sales_quot_stockist.cust_code__dist</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="20">char</type> <type size="20">char</type>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>city_name</name> <name>customer_city</name>
<dbname>city_name</dbname> <dbname>customer.city</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="5">char</type> <type size="50">char</type>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>site_code</name> <name>cust_name</name>
<dbname>site_code</dbname> <dbname>customer.cust_name</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="50">char</type> <type size="50">char</type>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>hospital_name</name> <name>stockist_name</name>
<dbname>hospital_name</dbname> <dbname>customer.cust_name</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="10">char</type> <type size="50">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>cust_code</name> <name>distributor_name</name>
<dbname>cust_code</dbname> <dbname>customer.cust_name</dbname>
</table_column> </table_column>
<table_column> <table_column>
<type size="50">char</type> <type size="5">char</type>
<updatewhereclause>yes</updatewhereclause> <updatewhereclause>yes</updatewhereclause>
<name>cust_code_desc</name> <name>site_code__pbus</name>
<dbname>cust_code_desc</dbname> <dbname>customer.site_code__pbus</dbname>
</table_column> </table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;quot_stockist&quot; ) COLUMN(NAME=&quot;quot_stockist.cust_code__dist&quot;) COLUMN(NAME=&quot;quot_stockist.cust_code__stk&quot;) COLUMN(NAME=&quot;quot_stockist.quot_no&quot;) COLUMN(NAME=&quot;quot_stockist.cust_code&quot;) COLUMN(NAME=&quot;quot_stockist.line_no&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__DIST) as distributor_name&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__STK) as stockist_name&quot;) COMPUTE(NAME=&quot;(select city from customer where cust_code = quot_stockist.CUST_CODE) as city_name&quot;) COMPUTE(NAME=&quot;(select SITE_CODE__PBUS from customer where cust_code = quot_stockist.CUST_CODE__DIST) as site_code&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE) as hospital_name&quot;) COMPUTE(NAME=&quot;(select cust_code from customer where cust_code = quot_stockist.CUST_CODE) as cust_code&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE) as cust_code_desc&quot;)) </retrieve> <retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;sales_quot_stockist&quot; ) TABLE(NAME=&quot;customer&quot; ALIAS=&quot;customer_a&quot; ) TABLE(NAME=&quot;sales_quot&quot; ) TABLE(NAME=&quot;customer&quot; ALIAS=&quot;customer_b&quot; ) TABLE(NAME=&quot;customer&quot; ALIAS=&quot;customer_c&quot; ) COLUMN(NAME=&quot;sales_quot_stockist.quot_no&quot;) COLUMN(NAME=&quot;sales_quot_stockist.line_no&quot;) COLUMN(NAME=&quot;sales_quot_stockist.cust_code&quot;) COLUMN(NAME=&quot;sales_quot_stockist.cust_code__stk&quot;) COLUMN(NAME=&quot;sales_quot.quot_no&quot;) COLUMN(NAME=&quot;sales_quot_stockist.cust_code__dist&quot;) COLUMN(NAME=&quot;customer_a.city&quot;) COLUMN(NAME=&quot;customer_a.cust_name&quot;) COLUMN(NAME=&quot;customer_b.cust_name&quot;) COLUMN(NAME=&quot;customer_c.cust_name&quot;) COLUMN(NAME=&quot;customer_c.site_code__pbus&quot;) JOIN (LEFT=&quot;sales_quot_stockist.cust_code&quot; OP =&quot;=&quot;RIGHT=&quot;customer_a.cust_code&quot; ) JOIN (LEFT=&quot;sales_quot.quot_no&quot; OP =&quot;=&quot;RIGHT=&quot;sales_quot_stockist.quot_no&quot; ) JOIN (LEFT=&quot;sales_quot_stockist.cust_code__stk&quot; OP =&quot;=&quot;RIGHT=&quot;customer_b.cust_code&quot; ) JOIN (LEFT=&quot;sales_quot_stockist.cust_code__dist&quot; OP =&quot;=&quot;RIGHT=&quot;customer_c.cust_code&quot; )WHERE( EXP1 =&quot;sales_quot_stockist.quot_no&quot; OP =&quot;=&quot; EXP2 =&quot;:quot_no&quot; ) ) ARG(NAME = &quot;quot_no&quot; TYPE = string) </retrieve>
<update>quot_stockist</update> <update>sales_quot_stockist</update>
<updatewhere>0</updatewhere> <updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace> <updatekeyinplace>no</updatekeyinplace>
<argument>
<name>quot_no</name>
<type>string</type>
</argument>
</TableDefinition> </TableDefinition>
<GroupBox> <GroupBox>
<band>Detail</band> <band>Detail</band>
<text>General </text> <text>General </text>
<border>2</border> <border>2</border>
<color>0</color> <color>0</color>
<x>211</x> <x>219</x>
<y>41</y> <y>39</y>
<height>337</height> <height>350</height>
<width>346</width> <width>346</width>
<name>gb_1</name> <name>gb_1</name>
<visible>1</visible> <visible>1</visible>
...@@ -182,15 +179,15 @@ ...@@ -182,15 +179,15 @@
</TextObject> </TextObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>3</id> <id>1</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>395</x> <x>398</x>
<y>60</y> <y>60</y>
<height>19</height> <height>16</height>
<width>66</width> <width>60</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -198,11 +195,9 @@ ...@@ -198,11 +195,9 @@
<name>quot_no</name> <name>quot_no</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>10</limit> <limit>0</limit>
<case>any</case> <case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect> <autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode> <imemode>0</imemode>
</EditStyle> </EditStyle>
<font> <font>
...@@ -248,15 +243,15 @@ ...@@ -248,15 +243,15 @@
</TextObject> </TextObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>5</id> <id>2</id>
<alignment>1</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>398</x> <x>392</x>
<y>92</y> <y>92</y>
<height>19</height> <height>16</height>
<width>72</width> <width>61</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -266,9 +261,7 @@ ...@@ -266,9 +261,7 @@
<EditStyle style="edit"> <EditStyle style="edit">
<limit>0</limit> <limit>0</limit>
<case>any</case> <case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect> <autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode> <imemode>0</imemode>
</EditStyle> </EditStyle>
<font> <font>
...@@ -314,12 +307,12 @@ ...@@ -314,12 +307,12 @@
</TextObject> </TextObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>11</id> <id>3</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>402</x> <x>394</x>
<y>130</y> <y>130</y>
<height>16</height> <height>16</height>
<width>60</width> <width>60</width>
...@@ -348,94 +341,21 @@ ...@@ -348,94 +341,21 @@
<color>536870912</color> <color>536870912</color>
</background> </background>
</ColumnObject> </ColumnObject>
<ColumnObject> <TextObject>
<band>Detail</band> <band>Detail</band>
<id>12</id> <alignment>1</alignment>
<alignment>0</alignment> <text>Distributor:</text>
<tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>0</color>
<x>366</x> <x>263</x>
<y>163</y> <y>283</y>
<height>16</height> <height>16</height>
<width>108</width> <width>77</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code_desc</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>269</x>
<y>274</y>
<height>17</height>
<width>104</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>stockist_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>8</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>265</x>
<y>202</y>
<height>17</height>
<width>88</width>
<format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>city_name</name> <name>cust_code__dist_t</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font> <font>
<face>Arial</face> <face>Arial</face>
<height>-10</height> <height>-10</height>
...@@ -448,23 +368,23 @@ ...@@ -448,23 +368,23 @@
<mode>1</mode> <mode>1</mode>
<color>536870912</color> <color>536870912</color>
</background> </background>
</ColumnObject> </TextObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>10</id> <id>6</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>399</x> <x>380</x>
<y>202</y> <y>283</y>
<height>19</height> <height>16</height>
<width>92</width> <width>108</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>hospital_name</name> <name>cust_code__dist</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>0</limit> <limit>0</limit>
...@@ -491,8 +411,8 @@ ...@@ -491,8 +411,8 @@
<text>Stockist:</text> <text>Stockist:</text>
<border>2</border> <border>2</border>
<color>0</color> <color>0</color>
<x>267</x> <x>264</x>
<y>240</y> <y>227</y>
<height>16</height> <height>16</height>
<width>65</width> <width>65</width>
<html> <html>
...@@ -515,15 +435,15 @@ ...@@ -515,15 +435,15 @@
</TextObject> </TextObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>2</id> <id>4</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>10</tabsequence> <tabsequence>10</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>401</x> <x>376</x>
<y>240</y> <y>227</y>
<height>19</height> <height>16</height>
<width>66</width> <width>102</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
...@@ -531,11 +451,9 @@ ...@@ -531,11 +451,9 @@
<name>cust_code__stk</name> <name>cust_code__stk</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>10</limit> <limit>0</limit>
<case>any</case> <case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect> <autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode> <imemode>0</imemode>
</EditStyle> </EditStyle>
<font> <font>
...@@ -551,21 +469,29 @@ ...@@ -551,21 +469,29 @@
<color>536870912</color> <color>536870912</color>
</background> </background>
</ColumnObject> </ColumnObject>
<TextObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<alignment>1</alignment> <id>7</id>
<text>Distributor:</text> <alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>0</color> <color>33554432</color>
<x>267</x> <x>386</x>
<y>307</y> <y>192</y>
<height>16</height> <height>16</height>
<width>77</width> <width>120</width>
<format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>cust_code__dist_t</name> <name>customer_city</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font> <font>
<face>Arial</face> <face>Arial</face>
<height>-10</height> <height>-10</height>
...@@ -578,30 +504,28 @@ ...@@ -578,30 +504,28 @@
<mode>1</mode> <mode>1</mode>
<color>536870912</color> <color>536870912</color>
</background> </background>
</TextObject> </ColumnObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>1</id> <id>8</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>407</x> <x>386</x>
<y>307</y> <y>156</y>
<height>19</height> <height>16</height>
<width>66</width> <width>140</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>cust_code__dist</name> <name>cust_name</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>10</limit> <limit>0</limit>
<case>any</case> <case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect> <autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode> <imemode>0</imemode>
</EditStyle> </EditStyle>
<font> <font>
...@@ -619,20 +543,20 @@ ...@@ -619,20 +543,20 @@
</ColumnObject> </ColumnObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>6</id> <id>9</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>396</x> <x>373</x>
<y>344</y> <y>251</y>
<height>21</height> <height>16</height>
<width>115</width> <width>152</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>distributor_name</name> <name>stockist_name</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>0</limit> <limit>0</limit>
...@@ -655,20 +579,20 @@ ...@@ -655,20 +579,20 @@
</ColumnObject> </ColumnObject>
<ColumnObject> <ColumnObject>
<band>Detail</band> <band>Detail</band>
<id>9</id> <id>10</id>
<alignment>0</alignment> <alignment>0</alignment>
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>2</border> <border>2</border>
<color>33554432</color> <color>33554432</color>
<x>267</x> <x>372</x>
<y>344</y> <y>309</y>
<height>17</height> <height>16</height>
<width>110</width> <width>154</width>
<format>[general]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>site_code</name> <name>distributor_name</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>0</limit> <limit>0</limit>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment