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

Fixed site_code__pbus join.

parent 3bcdfd01
......@@ -47,95 +47,92 @@
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code__dist</name>
<dbname>quot_stockist.cust_code__dist</dbname>
</table_column>
<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>
<key>yes</key>
<name>quot_no</name>
<dbname>sales_quot_stockist.quot_no</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<type precision="0">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<name>quot_no</name>
<dbname>quot_stockist.quot_no</dbname>
<name>line_no</name>
<dbname>sales_quot_stockist.line_no</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code</name>
<dbname>quot_stockist.cust_code</dbname>
<dbname>sales_quot_stockist.cust_code</dbname>
</table_column>
<table_column>
<type precision="0">decimal</type>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<name>line_no</name>
<dbname>quot_stockist.line_no</dbname>
<name>cust_code__stk</name>
<dbname>sales_quot_stockist.cust_code__stk</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<type size="10">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>distributor_name</name>
<dbname>distributor_name</dbname>
<name>sales_quot_quot_no</name>
<dbname>sales_quot.quot_no</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>stockist_name</name>
<dbname>stockist_name</dbname>
<name>cust_code__dist</name>
<dbname>sales_quot_stockist.cust_code__dist</dbname>
</table_column>
<table_column>
<type size="20">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>city_name</name>
<dbname>city_name</dbname>
<name>customer_city</name>
<dbname>customer.city</dbname>
</table_column>
<table_column>
<type size="5">char</type>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>site_code</name>
<dbname>site_code</dbname>
<name>cust_name</name>
<dbname>customer.cust_name</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>hospital_name</name>
<dbname>hospital_name</dbname>
<name>stockist_name</name>
<dbname>customer.cust_name</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code</name>
<dbname>cust_code</dbname>
<name>distributor_name</name>
<dbname>customer.cust_name</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<type size="5">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code_desc</name>
<dbname>cust_code_desc</dbname>
<name>site_code__pbus</name>
<dbname>customer.site_code__pbus</dbname>
</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>
<update>quot_stockist</update>
<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>sales_quot_stockist</update>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
<argument>
<name>quot_no</name>
<type>string</type>
</argument>
</TableDefinition>
<GroupBox>
<band>Detail</band>
<text>General </text>
<border>2</border>
<color>0</color>
<x>211</x>
<y>41</y>
<height>337</height>
<x>219</x>
<y>39</y>
<height>350</height>
<width>346</width>
<name>gb_1</name>
<visible>1</visible>
......@@ -182,15 +179,15 @@
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<id>1</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>395</x>
<x>398</x>
<y>60</y>
<height>19</height>
<width>66</width>
<height>16</height>
<width>60</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -198,11 +195,9 @@
<name>quot_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -248,15 +243,15 @@
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>5</id>
<alignment>1</alignment>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>398</x>
<x>392</x>
<y>92</y>
<height>19</height>
<width>72</width>
<height>16</height>
<width>61</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -266,9 +261,7 @@
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -314,12 +307,12 @@
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>11</id>
<id>3</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>402</x>
<x>394</x>
<y>130</y>
<height>16</height>
<width>60</width>
......@@ -348,94 +341,21 @@
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<TextObject>
<band>Detail</band>
<id>12</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<alignment>1</alignment>
<text>Distributor:</text>
<border>2</border>
<color>33554432</color>
<x>366</x>
<y>163</y>
<color>0</color>
<x>263</x>
<y>283</y>
<height>16</height>
<width>108</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>
<width>77</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>city_name</name>
<name>cust_code__dist_t</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>
......@@ -448,23 +368,23 @@
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>10</id>
<id>6</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>399</x>
<y>202</y>
<height>19</height>
<width>92</width>
<x>380</x>
<y>283</y>
<height>16</height>
<width>108</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>hospital_name</name>
<name>cust_code__dist</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
......@@ -491,8 +411,8 @@
<text>Stockist:</text>
<border>2</border>
<color>0</color>
<x>267</x>
<y>240</y>
<x>264</x>
<y>227</y>
<height>16</height>
<width>65</width>
<html>
......@@ -515,15 +435,15 @@
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<id>4</id>
<alignment>0</alignment>
<tabsequence>10</tabsequence>
<border>2</border>
<color>33554432</color>
<x>401</x>
<y>240</y>
<height>19</height>
<width>66</width>
<x>376</x>
<y>227</y>
<height>16</height>
<width>102</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -531,11 +451,9 @@
<name>cust_code__stk</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -551,21 +469,29 @@
<color>536870912</color>
</background>
</ColumnObject>
<TextObject>
<ColumnObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Distributor:</text>
<id>7</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>0</color>
<x>267</x>
<y>307</y>
<color>33554432</color>
<x>386</x>
<y>192</y>
<height>16</height>
<width>77</width>
<width>120</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist_t</name>
<name>customer_city</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>
......@@ -578,30 +504,28 @@
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
<id>8</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>407</x>
<y>307</y>
<height>19</height>
<width>66</width>
<x>386</x>
<y>156</y>
<height>16</height>
<width>140</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist</name>
<name>cust_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
......@@ -619,20 +543,20 @@
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>6</id>
<id>9</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>396</x>
<y>344</y>
<height>21</height>
<width>115</width>
<x>373</x>
<y>251</y>
<height>16</height>
<width>152</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>distributor_name</name>
<name>stockist_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
......@@ -655,20 +579,20 @@
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>9</id>
<id>10</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>267</x>
<y>344</y>
<height>17</height>
<width>110</width>
<x>372</x>
<y>309</y>
<height>16</height>
<width>154</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>site_code</name>
<name>distributor_name</name>
<visible>1</visible>
<EditStyle style="edit">
<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