<!-- 
RSS generated by JIRA (8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a) at Sat Feb 10 07:17:32 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Jira</title>
    <link>https://jira.astppbilling.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.13.3</version>
        <build-number>813003</build-number>
        <build-date>14-01-2021</build-date>
    </build-info>


<item>
            <title>[ASTPPCOM-481] Some invoice items assigned to wrong invoices and customers (invoice_details.accountid != invoices.accountid) for monthly post pay DIDCHRG &amp; SUBCHRG</title>
                <link>https://jira.astppbilling.org/browse/ASTPPCOM-481</link>
                <project id="10608" key="ASTPPCOM">ASTPP Community</project>
                    <description>&lt;p&gt;I have found we have some invoices where the invoices are wrong and contain items that should have been billed to other customers.  &lt;/p&gt;

&lt;p&gt;These items are easy to find by running this query&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;select&lt;/span&gt; *
&lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; `astpp`.`invoices` 
  &lt;span class=&quot;code-keyword&quot;&gt;LEFT&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;JOIN&lt;/span&gt; `astpp`.`invoice_details` &lt;span class=&quot;code-keyword&quot;&gt;ON&lt;/span&gt; `astpp`.`invoices`.`id` = `astpp`.`invoice_details`.`invoiceid`
  &lt;span class=&quot;code-keyword&quot;&gt;LEFT&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;JOIN&lt;/span&gt; `astpp`.`accounts` &lt;span class=&quot;code-keyword&quot;&gt;ON&lt;/span&gt; `astpp`.`invoice_details`.`accountid` = `astpp`.`accounts`.`id` 
&lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; astpp.invoices.accountid != astpp.invoice_details.accountid 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If any rows are returned, those are rows that have been added to the wrong invoice &amp;amp; customer.&lt;/p&gt;

&lt;p&gt;See attached image.  &lt;br/&gt;
&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/270973/51134314-1963a100-182f-11e9-8a09-7f2fe552c5f9.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;I have confirmed that the invoice_details.accountid is correct and both invoice.accountid and invoice_details.invoiceid are incorrect. Note that some of the invoices.ids are not only wrong between the tables, but are also used for multiple invoice_details.accountids&lt;/p&gt;

&lt;p&gt;The invoice_details.created_date on these items looks strange because the date is vaguely believable, but the times see odd. &lt;/p&gt;

&lt;p&gt;I have the astpp-invoice.log for the generation of some of these invoices, but there&apos;s not enough detail to be helpful. &lt;/p&gt;

&lt;p&gt;This looks like it may be related to &lt;a href=&quot;https://jira.astppbilling.org/browse/ASTPPCOM-179&quot; title=&quot;Problem automatic generation invoices&quot; class=&quot;issue-link&quot; data-issue-key=&quot;ASTPPCOM-179&quot;&gt;&lt;del&gt;ASTPPCOM-179&lt;/del&gt;&lt;/a&gt; which appears to have been closed without a clear resolution.&lt;/p&gt;

&lt;p&gt;My code is up to date to v3.6 I think to commit bee34d1d4bf82d61561a570be65ec3cf5eda166b &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Please can others using monthly post-pay please run query above and add their results?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m continuing to investigate.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12301">ASTPPCOM-481</key>
            <summary>Some invoice items assigned to wrong invoices and customers (invoice_details.accountid != invoices.accountid) for monthly post pay DIDCHRG &amp; SUBCHRG</summary>
                <type id="10201" iconUrl="https://jira.astppbilling.org/secure/viewavatar?size=xsmall&amp;avatarId=10700&amp;avatarType=issuetype">New Feature</type>
                                                <status id="10001" iconUrl="https://jira.astppbilling.org/images/icons/status_generic.gif" description="">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="samir.doshi">Samir Doshi</assignee>
                                    <reporter username="alexheylin">alexheylin</reporter>
                        <labels>
                    </labels>
                <created>Tue, 15 Jan 2019 00:43:48 +0530</created>
                <updated>Sun, 27 Oct 2019 15:50:28 +0530</updated>
                            <resolved>Sun, 27 Oct 2019 15:38:06 +0530</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                <comments>
                            <comment id="13501" author="alexheylin" created="Mon, 18 Feb 2019 22:47:10 +0530"  >&lt;p&gt;After some more investigation it seems invoices.accountid is often wrong for DIDCHRG &amp;amp; SUBCHRG.  In my data it&apos;s wrong 36% of the time, and this problem has been happening since the system was installed.   These entries also have the wrong value is invoice_details.invoiceid with items for multiple customers all having the same value for invoice_details.invoiceid.&lt;/p&gt;

&lt;p&gt;The PDF of the invoice is also wrong - with either the wrong customer on it, or charges for multiple customers on the one invoice.  This reflects what&apos;s the DB; if you use the invoices_details.invoiceid to select items for one invoice there&apos;s a good chance you&apos;ll get items that should be on separate invoices, often to separate customers.  &lt;/p&gt;

&lt;p&gt;Am I really the ONLY person seeing this?&lt;/p&gt;</comment>
                            <comment id="13502" author="alexheylin" created="Mon, 18 Feb 2019 22:52:20 +0530"  >&lt;p&gt;invoice_details.accountid IS correct for these entries.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10703" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>481</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10006" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i00blr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>