<commit_before><?
# $Id: accounting.php,v 1.39 2005/05/26 13:54:57 svenn Exp $ company_edit.php,v 1.4 2001/11/20 17:55:12 thomasek Exp $
# Based on EasyComposer technology
# Copyright <NAME>, 1994-2005, <EMAIL>, http://www.ekdahl.no

$db_table  = "company";
$db_table2 = "person";
$db_table3 = "accountplan";
$CompanyID = $_REQUEST['CompanyID'];
assert(!is_int($CompanyID)); #All main input should be int

require_once  "record.inc";

$query  = "select * from $db_table where CompanyID='$CompanyID'";
$row    = $_lib['storage']->get_row(array('query' => $query));

$query2  = "select AccountPlanID, AccountName, ReskontroFromAccount, ReskontroToAccount, AccountPlanType, ReskontroAccountPlanType from $db_table3 where EnableReskontro=1 and Active=1";
$result2 = $_lib['db']->db_query($query2);
?>

<? print $_lib['sess']->doctype ?>
<head>
    <title>Empatix - customer</title>
    <meta name="cvs"                content="$Id: accounting.php,v 1.39 2005/05/26 13:54:57 svenn Exp $" />
    <? includeinc('head') ?>
</head>

<body>

<? includeinc('top'); ?>
<? includeinc('left') ?>

<h2>Firmaopplysninger, <? print $row->VName; ?> (side 2 av 3)</h2>
<? print $message ?>
<table class="tab">
  <tr>
  <td><div class="tab"><a href="<? print $_SETUP['DISPATCH'] ?>&t=company.edit&CompanyID=<? print $CompanyID ?>">Adresser og kontaktinformasjon</a></div>
  <td><div class="active_tab"><a href="#">Regnskapsinformasjon</a></div>
  <td><div class="tab"><a href="<? print $_SETUP['DISPATCH'] ?>&t=company.misc&CompanyID=<? print $CompanyID ?>">Diverse</a></div>
  <td><div class="tab"><a href="<? print $_SETUP['DISPATCH'] ?>&t=borettslag.borettslag&CompanyID=<? print "$CompanyID"; 
?>">Borettslag</a></div>
</table>
<table cellspacing="0" class="lodo_data">
<thead>
  <form name="<? print $form_name ?>" action="<? print $MY_SELF ?>" method="post">
  <input type="hidden" name="CompanyID" value="<? print $row->CompanyID ?>">
</thead>

<tbody>

  <tr>
    <th colspan="4" class="menu">Kontoer</th>
  </tr>
  <tr>
    <td class="BGColorDark">Bankkonto</td>
    <td class="BGColorLight" colspan="3"><input type="text" name="company.BankAccount"  value="<? print $row->BankAccount ?>" size="70"></td>
  </tr>
  <tr>
    <td class="BGColorDark">Postgirokonto</td>
    <td class="BGColorLight" colspan="3"><input type="text" name="company.PostAccount"  value="<? print $row->PostAccount ?>" size="70"></td>
  </tr>
  <tr>
    <th colspan="4" class="menu">Regnskapskontoer (deprecated - vi bruker n&aring; metadata p&aring; kontoplanen for &aring; bestemme hva det er)</th>
   </tr>
   <tr>
    <td class="BGColorDark">Ansatte</td>
    <td class="BGColorLight">
        <? if($_lib['sess']->get_person('AccessLevel') > 3) { ?>
        <input type="text" name="company.AccountEmployeeFrom"   value="<? print $row->AccountEmployeeFrom ?>" size="14">
        <input type="text" name="company.AccountEmployeeTo"     value="<? print $row->AccountEmployeeTo ?>" size="14">
        <? } else {
            print $row->AccountEmployeeFrom; ?> - <? print $row->AccountEmployeeTo; ?>
        <? } ?></td>
    <td class="BGColorDark"></td>
    <td class="BGColorLight"></td>
  </tr>
  <tr>
    We dont need this with metadata based accountplans
    <td class="BGColorDark">Hovedbok balanse</td>
    <td class="BGColorLight">
        <? if($_lib['sess']->get_person('AccessLevel') > 3) { ?>
        <input type="text" name="company.AccountHovedbokBalanseFrom"    value="<? print $row->AccountHovedbokBalanseFrom ?>" size="14">
        <input type="text" name="company.AccountHovedbokBalanseTo"      value="<? print $row->AccountHovedbokBalanseTo ?>" size="14">
        <? } else {
            print $row->AccountHovedbokBalanseFrom ?> - <? print $row->AccountHovedbokBalanseTo ?>
        <? } ?></td>
    <td>Prosjekt starter fra 0 og oppover
    <td>
  </tr>
  <tr>
    <td class="BGColorDark">Hovedbok resultat
    <td class="BGColorLight">
        <? if($_lib['sess']->get_person('AccessLevel') > 3) { ?>
        <input type="text" name="company.AccountHovedbokResultatFrom"   value="<? print $row->AccountHovedbokResultatFrom ?>" size="14">
        <input type="text" name="company.AccountHovedbokResultatTo"     value="<? print $row->AccountHovedbokResultatTo ?>" size="14">
        <? } else {
            print $row->AccountHovedbokResultatFrom ?> - <? print $row->AccountHovedbokResultatTo ?>
        <? } ?>
    <td>Avdeling starter fra 0 og oppover</td>
    <td></td>
  </tr>
  <tr>
    <td class="BGColorDark">Reskontro</td>
    <td class="BGColorLight">
      <?
      if($_lib['sess']->get_person('AccessLevel') > 3)
      {
        ?>
        <input type="text" name="company.AccountHovedbokReskontroFrom"   value="<? print $row->AccountHovedbokReskontroFrom ?>" size="14">
        <input type="text" name="company.AccountHovedbokReskontroTo"     value="<? print $row->AccountHovedbokReskontroTo ?>" size="14">
      <?
      }
      else
      {
        print $row->AccountHovedbokReskontroFrom." - ".$row->AccountHovedbokReskontroTo;
      }
      ?>
    <td></td>
    <td></td>
   </tr>
  <tr>
    <td class="BGColorDark">Konto for timef&oslash;rings kunder</td>
    <td class="BGColorLight" colspan="3"><input type="text" name="company.HourAccountPlanID"  value="<? print $row->HourAccountPlanID ?>" size="70"></td>
  </tr>
    <?
    while($row2 = $_dbh[$_dsn]->db_fetch_object($result2))
    {
    ?>
    <tr>
      <td class="BGColorDark"><? print $row2->AccountPlanID." - ".$row2->AccountName ?></td>
      <td class="BGColorLight"> <? print $row2->ReskontroAccountPlanType . " - " . $row2->ReskontroFromAccount . " - " . $row2->ReskontroToAccount; ?></td>
      <td></td>
      <td></td>
    </tr>
    <?
    }
    ?>
  <tr>
    <th colspan="4" class="menu">Renter
  </tr>
  <tr>
    <td class="BGColorDark">Rentesats</td>
    <td class="BGColorLight"><input type="text" name="company.InterestRate" value="<? print $row->InterestRate ?>" size="24"></td>
    <td class="BGColorDark">Rentedato</td>
    <td class="BGColorLight"><input type="text" name="company.InterestDate" value="<? print $row->InterestDate ?>" size="24"></td>
  </tr>
  <tr>
    <td class="BGColorDark">Purregebyr</td>
    <td class="BGColorLight"><input type="text" name="company.CollectionFee" value="<? print $row->CollectionFee ?>" size="24"></td>
  </tr>
  <tr>
    <th colspan="4" class="menu">Aksjer</th>
  </tr>
  <tr>
    <td class="BGColorDark">Aksjeverdi</td>
    <td class="BGColorLight"><input type="text" name="company.ShareValue"   value="<? print $row->ShareValue ?>" size="24"></td>
    <td class="BGColorDark">Antall aksjer</td>
    <td class="BGColorLight"><input type="text" name="company.ShareNumber"  value="<? print $row->ShareNumber ?>" size="24"></td>
  </tr>
  <tr>
    <td class="BGColorDark">Stiftelsesdato</td>
    <td class="BGColorLight"><input type="text" name="company.FoundedDate"   value="<? print $row->FoundedDate ?>" size="24"></td>
    <td class="BGColorDark"></td>
    <td class="BGColorLight"></td>
  </tr>
  <tr>
    <th colspan="4" class="menu">Regnskap</th>
  </tr><commit_msg>Changed label<commit_after><?
# $Id: accounting.php,v 1.39 2005/05/26 13:54:57 svenn Exp $ company_edit.php,v 1.4 2001/11/20 17:55:12 thomasek Exp $
# Based on EasyComposer technology
# Copyright <NAME>, 1994-2005, <EMAIL>, http://www.ekdahl.no

$db_table  = "company";
$db_table2 = "person";
$db_table3 = "accountplan";
$CompanyID = $_REQUEST['CompanyID'];
assert(!is_int($CompanyID)); #All main input should be int

require_once  "record.inc";

$query  = "select * from $db_table where CompanyID='$CompanyID'";
$row    = $_lib['storage']->get_row(array('query' => $query));

$query2  = "select AccountPlanID, AccountName, ReskontroFromAccount, ReskontroToAccount, AccountPlanType, ReskontroAccountPlanType from $db_table3 where EnableReskontro=1 and Active=1";
$result2 = $_lib['db']->db_query($query2);
?>

<? print $_lib['sess']->doctype ?>
<head>
    <title>Empatix - customer</title>
    <meta name="cvs"                content="$Id: accounting.php,v 1.39 2005/05/26 13:54:57 svenn Exp $" />
    <? includeinc('head') ?>
</head>

<body>

<? includeinc('top'); ?>
<? includeinc('left') ?>

<h2>Firmaopplysninger, <? print $row->VName; ?> (side 2 av 3)</h2>
<? print $message ?>
<table class="tab">
  <tr>
  <td><div class="tab"><a href="<? print $_SETUP['DISPATCH'] ?>&t=company.edit&CompanyID=<? print $CompanyID ?>">Adresser og kontaktinformasjon</a></div>
  <td><div class="active_tab"><a href="#">Regnskapsinformasjon</a></div>
  <td><div class="tab"><a href="<? print $_SETUP['DISPATCH'] ?>&t=company.misc&CompanyID=<? print $CompanyID ?>">Diverse</a></div>
  <td><div class="tab"><a href="<? print $_SETUP['DISPATCH'] ?>&t=borettslag.borettslag&CompanyID=<? print "$CompanyID"; 
?>">Borettslag</a></div>
</table>
<table cellspacing="0" class="lodo_data">
<thead>
  <form name="<? print $form_name ?>" action="<? print $MY_SELF ?>" method="post">
  <input type="hidden" name="CompanyID" value="<? print $row->CompanyID ?>">
</thead>

<tbody>

  <tr>
    <th colspan="4" class="menu">Kontoer</th>
  </tr>
  <tr>
    <td class="BGColorDark">Bankkonto</td>
    <td class="BGColorLight" colspan="3"><input type="text" name="company.BankAccount"  value="<? print $row->BankAccount ?>" size="70"></td>
  </tr>
  <tr>
    <td class="BGColorDark">Postgirokonto</td>
    <td class="BGColorLight" colspan="3"><input type="text" name="company.PostAccount"  value="<? print $row->PostAccount ?>" size="70"></td>
  </tr>
  <tr>
    <th colspan="4" class="menu">Renter
  </tr>
  <tr>
    <td class="BGColorDark">Rentesats</td>
    <td class="BGColorLight"><input type="text" name="company.InterestRate" value="<? print $row->InterestRate ?>" size="24"></td>
    <td class="BGColorDark">Rentedato</td>
    <td class="BGColorLight"><input type="text" name="company.InterestDate" value="<? print $row->InterestDate ?>" size="24"></td>
  </tr>
  <tr>
    <td class="BGColorDark">Purregebyr</td>
    <td class="BGColorLight"><input type="text" name="company.CollectionFee" value="<? print $row->CollectionFee ?>" size="24"></td>
  </tr>
  <tr>
    <th colspan="4" class="menu">Aksjer</th>
  </tr>
  <tr>
    <td class="BGColorDark">Aksjeverdi</td>
    <td class="BGColorLight"><input type="text" name="company.ShareValue"   value="<? print $row->ShareValue ?>" size="24"></td>
    <td class="BGColorDark">Antall aksjer</td>
    <td class="BGColorLight"><input type="text" name="company.ShareNumber"  value="<? print $row->ShareNumber ?>" size="24"></td>
  </tr>
  <tr>
    <td class="BGColorDark">Stiftelsesdato</td>
    <td class="BGColorLight"><input type="text" name="company.FoundedDate"   value="<? print $row->FoundedDate ?>" size="24"></td>
    <td class="BGColorDark"></td>
    <td class="BGColorLight"></td>
  </tr>
  <tr>
    <th colspan="4" class="menu">Regnskap (F&oslash;rste ledig nummer)</th>
  </tr>
{'fraction_non_alphanumeric': 0.2105359765051395, 'fraction_numerical': 0.020099118942731278, 'mean_word_length': 4.5286656519533235, 'pattern_counts': {'":': 0, '<': 362, '<?xml version=': 0, '>': 421, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '110499', 'n_tokens_mistral': 4058, 'n_tokens_neox': 3920, 'n_words': 731}