当前位置: 首页>>代码示例>>PHP>>正文


PHP dkdato函数代码示例

本文整理汇总了PHP中dkdato函数的典型用法代码示例。如果您正苦于以下问题:PHP dkdato函数的具体用法?PHP dkdato怎么用?PHP dkdato使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了dkdato函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: betalingsdage

 function betalingsdage($fakturadate, $forfaldsdate)
 {
     list($faktaar, $faktmd, $faktdag) = split("-", $fakturadate);
     list($forfaldsaar, $forfaldsmd, $forfaldsdag) = split("-", $forfaldsdate);
     $diffaar = $forfaldsaar - $faktaar;
     $diffmd = $forfaldsmd - $faktmd;
     $diffdag = $forfaldsdag - $faktdag;
     $dage = 0;
     if ($diffmd) {
         switch ($faktmd) {
             case 1:
             case 3:
             case 5:
             case 7:
             case 8:
             case 10:
             case 12:
                 $dage = $dage + 31 - $faktdag;
                 break;
             case 2:
                 if (checkdate($faktmd, 29, $faktaar)) {
                     $dage = $dage + 29 - $faktdag;
                 } else {
                     $dage = $dage + 28 - $faktdag;
                 }
                 break;
             case 4:
             case 6:
             case 9:
             case 11:
                 $dage = $dage + 30 - $faktdag;
                 break;
         }
         $dage = $dage + $forfaldsdag;
     }
     if ($diffaar) {
     }
     return dkdato($forfaldsaar . "-" . $forfaldsmd . "-" . $betalingsdage);
 }
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:39,代码来源:betalingsdage.php

示例2: forfaldsdag

 function forfaldsdag($fakturadate, $betalingsbet, $betalingsdage)
 {
     $betalingsbet = strtolower($betalingsbet);
     list($faktaar, $faktmd, $faktdag) = explode("-", $fakturadate);
     $forfaldsaar = $faktaar;
     $forfaldsmd = $faktmd;
     $forfaldsdag = $faktdag;
     $slutdag = 31;
     if ($fakturadate && $betalingsbet != "efterkrav" && $betalingsbet != "kontant") {
         while (!checkdate($forfaldsmd, $slutdag, $forfaldsaar)) {
             $slutdag--;
             if ($slutdag < 27) {
                 break 1;
             }
         }
         if ($betalingsbet != "netto") {
             $forfaldsdag = $slutdag;
         }
         # Saa maa det vaere lb. md
         $forfaldsdag = $forfaldsdag + $betalingsdage;
         while ($forfaldsdag > $slutdag) {
             $forfaldsmd++;
             if ($forfaldsmd > 12) {
                 $forfaldsaar++;
                 $forfaldsmd = 1;
             }
             $forfaldsdag = $forfaldsdag - $slutdag;
             $slutdag = 31;
             while (!checkdate($forfaldsmd, $slutdag, $forfaldsaar)) {
                 $slutdag--;
                 if ($slutdag < 27) {
                     break 1;
                 }
             }
         }
     }
     return dkdato($forfaldsaar . "-" . $forfaldsmd . "-" . $forfaldsdag);
 }
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:38,代码来源:forfaldsdag.php

示例3: stripslashes

$lev_pbs_nr = $r['pbs_nr'];
$lev_pbs = $r['pbs'];
$y = -1;
for ($x = 0; $x < $ordreantal; $x++) {
    if ($r = db_fetch_array(db_select("select * from ordrer where id = '{$ordreliste[$x]}' and status<'3'", __FILE__ . " linje " . __LINE__))) {
        $y++;
        $id[$y] = $r['id'] * 1;
        $konto_id[$y] = $r['konto_id'] * 1;
        $kontonr[$y] = $r['kontonr'];
        $firmanavn[$y] = stripslashes(htmlentities(trim($r['firmanavn']), ENT_COMPAT, $charset));
        $addr1[$y] = stripslashes(htmlentities(trim($r['addr1']), ENT_COMPAT, $charset));
        $addr2[$y] = stripslashes(htmlentities(trim($r['addr2']), ENT_COMPAT, $charset));
        $postnr[$y] = stripslashes(htmlentities(trim($r['postnr']), ENT_COMPAT, $charset));
        $bynavn[$y] = stripslashes(htmlentities(trim($r['bynavn']), ENT_COMPAT, $charset));
        $fakturadato[$y] = dkdato($r['fakturadate']);
        $genfakt[$y] = dkdato($r['nextfakt']);
        $betalingsbet[$y] = $r['betalingsbet'];
        $betalingsdage[$y] = $r['betalingsdage'];
        $udskriv_til[$y] = $r['udskriv_til'];
        $email[$y] = $r['email'];
        $projekt[$y] = $r['projekt'];
        $procenttillag[$y] = $r['procenttillag'] * 1;
        if (!$email[$y] && $udskriv_til[$y] == 'email') {
            $udskriv_til[$y] = 'PDF';
        }
        $r = db_fetch_array(db_select("select pbs_nr,pbs from adresser where id = '{$konto_id[$y]}'", __FILE__ . " linje " . __LINE__));
        $pbs[$y] = $r['pbs'];
        $pbs_nr[$y] = $r['pbs_nr'];
        $r = db_fetch_array(db_select("select * from adresser where id = '{$konto_id[$y]}'", __FILE__ . " linje " . __LINE__));
        $stam_firmanavn[$y] = stripslashes(htmlentities(trim($r['firmanavn']), ENT_COMPAT, $charset));
        $stam_addr1[$y] = stripslashes(htmlentities(trim($r['addr1']), ENT_COMPAT, $charset));
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:ret_genfakt.php

示例4: findtekst

print "<td width=\"115\"><FONT FACE={$font} SIZE=\"2\">" . findtekst(20, $sprog_id) . "</font></td>";
print "<td width=\"115\"><FONT FACE={$font} SIZE=\"2\">" . findtekst(21, $sprog_id) . "</font></td>";
print "<td width=\"115\"><FONT FACE={$font} SIZE=\"2\">" . findtekst(22, $sprog_id) . "</font></td>";
print "<td width=\"115\"><FONT FACE={$font} SIZE=\"2\">" . findtekst(23, $sprog_id) . "</font></td></tr>";
$x = 1;
#while (isset($felt_id[2][$x])|isset($felt_id[3][$x])|isset($felt_id[4][$x])|isset($felt_id[5][$x])|isset($felt_id[6][$x])|isset($felt_id[7][$x])) {
while ($x <= 5) {
    for ($i = 2; $i <= 7; $i++) {
        if (!isset($felt_indhold[$i][$x])) {
            $felt_indhold[$i][$x] = NULL;
        }
    }
    $sum5 = $sum5 + $felt_indhold[5][$x];
    $sum6 = $sum6 + $felt_indhold[6][$x];
    $sum7 = $sum7 + $felt_indhold[7][$x];
    print "<tr><td width=\"115\"><FONT FACE={$font} SIZE=\"2\">" . dkdato($felt_indhold[2][$x]) . "<br></font></td>";
    print "<td width=\"115\"><FONT FACE={$font} SIZE=\"2\">" . $felt_indhold[3][$x] . "<br></font></td>";
    print "<td width=\"115\"><FONT FACE={$font} SIZE=\"2\">" . $felt_indhold[4][$x] . "<br></font></td>";
    if ($felt_indhold[5][$x]) {
        $tmp = dkdecimal($felt_indhold[5][$x]);
    } else {
        $tmp = '';
    }
    print "<td width=\"115\" align=right><FONT FACE={$font} SIZE=\"2\">{$tmp}<br></font></td>";
    if ($felt_indhold[6][$x]) {
        $tmp = dkdecimal($felt_indhold[6][$x]);
    } else {
        $tmp = '';
    }
    print "<td width=\"115\" align=right><FONT FACE={$font} SIZE=\"2\">{$tmp}<br></font></td>";
    if ($felt_indhold[7][$x]) {
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:jobkortprint.php

示例5: elseif

 $modt_konto = $r['modt_reg'] . $tmp;
 if ($r['erh']) {
     $erh = $r['erh'];
 } elseif ($r['modt_fi']) {
     $erh = "ERH351";
 } else {
     $erh = "ERH356";
 }
 if ($erh == "ERH351" || $erh == "ERH357" || $erh == "ERH358" || $erh == "SDCK020") {
     $modt_konto = $r['modt_fi'];
     $kort_ref = $r['betal_id'];
 } elseif ($r['faktnr']) {
     $kort_ref = "Fakt: " . $r['faktnr'];
 }
 if ($r['forfaldsdate']) {
     $forfaldsdag = str_replace("-", "", dkdato($r['forfaldsdate']));
 } else {
     $forfaldsdag = str_replace("-", "", forfaldsdag($r['transdate'], $r['betalingsbet'], $r['betalingsdage']));
 }
 $belob = dkdecimal($r['amount'] * -1);
 $valuta = $r['valuta'];
 if (!$valuta) {
     $valuta = 'DKK';
 }
 if ($r['betal_id']) {
     if (substr($r['betal_id'], 0, 1) == "+") {
         $betal_id = substr($r['betal_id'], 1);
         list($tmp, $tmp2) = explode("<", $betal_id);
         if ($tmp == '04' || $tmp == '15') {
             $erh = 'ERH352';
         } elseif ($tmp == '71') {
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:betalinger.php

示例6: date

$year = date("y");
$tmp = $year - 1;
if ($tmp < 10) {
    $tmp = "0" . $tmp;
}
if (!$periode) {
    $periode = "{$day}" . "{$month}" . "{$tmp}" . ":" . "{$day}" . "{$month}" . "{$year}";
}
list($fra, $til) = split(":", $periode);
if (!$til) {
    $til = date("dmY");
}
$from = usdate($fra);
$to = usdate($til);
$fra = dkdato($from);
$til = dkdato($to);
print "<table width = 100% cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody>";
print "<tr><td colspan=\"4\" height=\"8\">";
print "<table width=\"100%\" align=\"center\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\"><tbody>";
#B
$tekst = "Klik her for at lukke \"Top100\"";
print "<td width=\"10%\" {$top_bund} title='{$tekst}'><a href=../includes/luk.php accesskey=L>Luk</a></td>";
print "<td width=\"80%\" {$top_bund}>Top 100 i perioden: {$fra} til {$til}</td>";
$tekst = "Klik her for at v&aelig;lge en anden periode";
print "<td width=\"10%\" {$top_bund} title='{$tekst}'><a href=top100.php?periode={$periode}&ret=on accesskey=P>Periode<br></a></td>";
print "</tbody></table>";
print "</td></tr>\n";
if ($ret) {
    $tekst = "Skriv fra &amp; til dato som mmdd&aring;&aring;:mmdd&aring;&aring;. Hvis der kun skrives én dato, s&aelig;ttes dato til dags dato.";
    print "<form name=omsaetning action=top100.php method=post>";
    print "<tr><td colspan=4 align=center title=\"{$tekst}\">V&aelig;lg periode <input type=text name=periode value=\"{$periode}\">&nbsp;";
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:top100.php

示例7: dkdato

$kred_ord_id = $row['kred_ord_id'];
$levdate = $row['levdate'];
$valuta = $row['valuta'];
$projekt[0] = $row['projekt'];
$cvrnr = $row['cvrnr'];
if ($valuta && $valuta != 'DKK') {
    if ($r = db_fetch_array(db_select("select valuta.kurs as kurs, grupper.box3 as difkto from valuta, grupper where grupper.art='VK' and grupper.box1='{$valuta}' and valuta.gruppe=" . nr_cast("grupper.kodenr", __FILE__ . " linje " . __LINE__) . " and valuta.valdate <= '{$levdate}' order by valuta.valdate desc", __FILE__ . " linje " . __LINE__))) {
        $valutakurs = $r['kurs'] * 1;
        $difkto = $r['difkto'] * 1;
        if (!db_fetch_array(db_select("select id from kontoplan where kontonr='{$difkto}' and regnskabsaar='{$regnaar}'", __FILE__ . " linje " . __LINE__))) {
            print "<BODY onLoad=\"javascript:alert('Kontonr {$difkto} (kursdiff) eksisterer ikke')\">";
            print "<meta http-equiv=\"refresh\" content=\"0;URL=ordre.php?id={$id}\">";
            exit;
        }
    } else {
        $tmp = dkdato($levdate);
        print "<BODY onLoad=\"javascript:alert('Der er ikke nogen valutakurs for {$valuta} den {$tmp}')\">";
        print "<meta http-equiv=\"refresh\" content=\"0;URL=ordre.php?id={$id}\">";
        exit;
    }
} else {
    $valuta = 'DKK';
    $valutakurs = 100;
}
if (!$row['levdate']) {
    print "<BODY onLoad=\"javascript:alert('Leveringsdato SKAL udfyldes')\">";
    print "<meta http-equiv=\"refresh\" content=\"0;URL=ordre.php?id={$id}\">";
    exit;
} elseif (!trim($row['fakturanr'])) {
    print "<BODY onLoad=\"javascript:alert('Fakturanummer SKAL udfyldes og m&aring; ikke v&aelig;re 0')\">";
    print "<meta http-equiv=\"refresh\" content=\"0;URL=ordre.php?id={$id}\">";
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:bogfor.php

示例8: send_mails

function send_mails($kontoantal, $konto_id, $email, $fra, $til)
{
    global $db;
    global $brugernavn;
    global $bgcolor;
    global $bgcolor5;
    global $charset;
    ini_set("include_path", ".:../phpmailer");
    require "class.phpmailer.php";
    $tmpmappe = "../temp/{$db}/" . str_replace(" ", "_", $brugernavn);
    mkdir($tmpmappe);
    for ($x = 1; $x <= $kontoantal; $x++) {
        mkdir("{$tmpmappe}/{$x}");
        if ($konto_id[$x] && $email[$x] && $fra[$x] && $til[$x] && strpos($email[$x], '@')) {
            $fromdate[$x] = usdate($fra[$x]);
            $todate[$x] = usdate($til[$x]);
            $mailtext = "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTMP 4.01 Transitional//EN\">\n";
            $mailtext .= "<html><head><meta content=\"text/html; charset=ISO-8859-15\" http-equiv=\"content-type\">\n";
            $row = db_fetch_array(db_select("select firmanavn from adresser where art = 'S'", __FILE__ . " linje " . __LINE__));
            $mailtext .= "<title>Kontoudtog fra {$row['firmanavn']}</title></head>\n";
            $mailtext .= "<body bgcolor={$bgcolor} link='#000000' vlink='#000000' alink='#000000' center=''>\n";
            $mailtext .= "<table width = 100% cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tbody>\n";
            $mailtext .= "<tr><td colspan=\"5\"><b>{$row['firmanavn']}</b></td><td colspan=\"2\" align=\"right\">Dato</td><td align=right> " . date('d-m-Y') . "</td></tr>\n";
            $mailtext .= "<tr><td colspan=8><hr></td></tr>\n";
            $mailtext .= "<tr><td colspan=\"8\" style=\"font-size:115%;font-weight:bold\">Kontoudtog</td></tr>\n";
            $row = db_fetch_array(db_select("select * from adresser where id={$konto_id[$x]}", __FILE__ . " linje " . __LINE__));
            $mailtext .= "<tr><td colspan=\"5\">{$row['firmanavn']}</td><td colspan=\"2\" align=\"right\">Kontonr.</td><td align=right> {$row['kontonr']}</td></tr>\n";
            $mailtext .= "<tr><td colspan=\"8\">{$row['addr1']}</td></tr>\n";
            if ($row[addr2]) {
                $mailtext .= "<tr><td colspan=\"8\">{$row['addr2']}</td></tr>\n";
            }
            $mailtext .= "<tr><td colspan=\"8\">{$row['postnr']} {$row['bynavn']}</td></tr>\n";
            $mailtext .= "<tr><td><br></td></tr>\n";
            $mailtext .= "<tr><td width=\"10%\"> Dato</td><td width=\"5%\"> Bilag</td><td width=\"5%\"> Faktura</td><td width=\"40%\" align=\"center\"> Tekst</td><td> Forfaldsdato</td><td width=\"10%\" align=\"right\"> Debet</td><td width=\"10%\" align=\"right\"> Kredit</td><td width=\"10%\" align=\"right\"> Saldo</td></tr>\n";
            $mailtext .= "<tr><td colspan=8><hr></td></tr>\n";
            $betalingsbet = trim($row['betalingsbet']);
            $betalingsdage = $row['betalingsdage'];
            $kontosum = 0;
            $primo = 0;
            $primoprint = 0;
            $query = db_select("select * from openpost where konto_id={$konto_id[$x]} and transdate<='{$todate[$x]}' order by transdate, faktnr", __FILE__ . " linje " . __LINE__);
            while ($row = db_fetch_array($query)) {
                $amount = afrund($row['amount'], 2);
                $forfaldsdag = NULL;
                if ($row['forfaldsdate']) {
                    $forfaldsdag = dkdato($row['forfaldsdate']);
                }
                if ($row['transdate'] < $fromdate[$x]) {
                    $primoprint = 0;
                    $kontosum = $kontosum + $amount;
                } else {
                    if ($primoprint == 0) {
                        $tmp = dkdecimal($kontosum);
                        $linjebg = $bgcolor5;
                        $color = '#000000';
                        $mailtext .= "<tr bgcolor=\"{$linjebg}\"><td colspan=\"3\"></td><td>Primosaldo</td><td colspan=\"3\"></td><td align=right> {$tmp}</td></tr>\n";
                        $primoprint = 1;
                    }
                    if ($linjebg != $bgcolor) {
                        $linjebg = $bgcolor;
                        $color = '#000000';
                    } elseif ($linjebg != $bgcolor5) {
                        $linjebg = $bgcolor5;
                        $color = '#000000';
                    }
                    $mailtext .= "<tr bgcolor=\"{$linjebg}\"><td> " . dkdato($row['transdate']) . "&nbsp;</td><td> {$row['refnr']}&nbsp;</td><td> {$row['faktnr']}&nbsp;</td><td> {$row['beskrivelse']}</td>\n";
                    if ($amount < 0) {
                        $tmp = 0 - $amount;
                    } else {
                        $tmp = $amount;
                    }
                    $tmp = dkdecimal($tmp);
                    if (!$forfaldsdag) {
                        $forfaldsdag = forfaldsdag($row['transdate'], $betalingsbet, $betalingsdage);
                    }
                    if ($row[udlignet] != '1' && $forfaldsdag < $currentdate) {
                        $stil = "<span style='color: rgb(255, 0, 0);'>";
                    } else {
                        $stil = "<span style='color: rgb(0, 0, 0);'>";
                    }
                    if ($amount > 0) {
                        $mailtext .= "<td>{$stil}{$forfaldsdag}</td><td align=right>{$stil} {$tmp}</td><td></td>\n";
                        $forfaldsum = $forfaldsum + $amount;
                    } else {
                        $mailtext .= "<td></td><td></td><td align=right>{$stil}{$tmp}</td>\n";
                    }
                    $kontosum = $kontosum + $amount;
                    $tmp = dkdecimal($kontosum);
                    $mailtext .= "<td align=right> {$tmp}</td>\n";
                    $mailtext .= "</tr>\n";
                }
            }
            if ($primoprint == 0) {
                $tmp = dkdecimal($kontosum);
                $mailtext .= "<tr><td></td><td></td><td></td><td> Primosaldo</td><td></td><td></td><td></td><td align=right> {$tmp}</td></tr>\n";
            }
            $mailtext .= "<tr><td colspan=\"8\"><hr></td></tr>\n";
            $row = db_fetch_array(db_select("select * from adresser where art = 'S'", __FILE__ . " linje " . __LINE__));
            $mailtext .= "<tr><td colspan=\"8\">\n";
            if ($row['bank_konto']) {
//.........这里部分代码省略.........
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:101,代码来源:mail_kontoudtog.php

示例9: if_isset

        $regnskab[$x] = $r['regnskab'];
        $db_navn[$x] = $r['db'];
        $posteringer[$x] = $r['posteringer'] * 1;
        $posteret[$x] = $r['posteret'] * 1;
        $brugerantal[$x] = $r['brugerantal'] * 1;
        $sidst[$x] = $r['sidst'];
        #		$oprettet[$x]=date("d-m-Y",$r['oprettet']);
        $lukket[$x] = if_isset($r['lukket']);
        $lukkes[$x] = if_isset($r['lukkes']);
        $betalt_til[$x] = if_isset($r['betalt_til']);
        $logintekst[$x] = if_isset($r['logintekst']);
        if ($lukkes[$x]) {
            $lukkes[$x] = dkdato($lukkes[$x]);
        }
        if ($betalt_til[$x]) {
            $betalt_til[$x] = dkdato($betalt_til[$x]);
        }
    }
}
$antal = $x;
if ($beregn) {
    $y = date("Y") - 1;
    $m = date("m");
    $d = date("d");
    $dd = $y . "-" . $m . "-" . $d;
    for ($x = 1; $x <= $antal; $x++) {
        db_connect("{$sqhost}", "{$squser}", "{$sqpass}", "{$db_navn[$x]}", __FILE__ . " linje " . __LINE__);
        #		db_connect ("host=$sqhost dbname=$db_navn user=$squser password=$sqpass");
        $r = db_fetch_array(db_select("select count(id) as transantal from transaktioner where logdate >= '{$dd}'", __FILE__ . " linje " . __LINE__));
        $posteringer[$x] = $r['transantal'] * 1;
        if ($r = db_fetch_array(db_select("select max(logdate) as logdate from transaktioner", __FILE__ . " linje " . __LINE__))) {
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:vis_regnskaber.php

示例10: sidste_5

function sidste_5($kontonr, $art, $dk)
{
    global $kladde_id;
    global $charset;
    if ($dk == "D") {
        $txt = "select bilag,transdate,beskrivelse,debet as kontonr from kassekladde where k_type = '{$art}' and kredit = '{$kontonr}' and kladde_id != '{$kladde_id}' order by transdate desc";
    } else {
        $txt = "select bilag,transdate,beskrivelse,kredit as kontonr from kassekladde where d_type = '{$art}' and debet = '{$kontonr}' and kladde_id != '{$kladde_id}' order by transdate desc";
    }
    $retur = "<table border=1><tbody>";
    if ($art == 'K') {
        $retur .= "<tr><td colspan=4>Sidste 5 posteringer for kreditor: {$kontonr}</td></tr>";
    } else {
        $retur .= "<tr><td colspan=4>Sidste 5 posteringer for debitor: {$kontonr}</td></tr>";
    }
    $retur .= "<tr><td>bilag</td><td>dato</td><td>tekst</td><td>kontonr</td></tr>";
    $x = 0;
    if (is_numeric($kontonr)) {
        $q = db_select($txt, __FILE__ . " linje " . __LINE__);
        while ($x < 5 && ($r = db_fetch_array($q))) {
            if ($r['kontonr']) {
                $x++;
                // 20130221 htmlentities på beskrivelse:
                $retur .= "<tr><td align=right>" . $r['bilag'] . "</td><td>" . dkdato($r['transdate']) . "</td><td>" . htmlentities($r['beskrivelse'], ENT_QUOTES, "{$charset}") . "</td><td>" . $r['kontonr'] . "</td></tr>";
            }
        }
        $retur .= "</tbody></table>";
    }
    if ($x) {
        return $retur;
    } else {
        return NULL;
    }
}
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:34,代码来源:kassekladde.php

示例11: str_replace

        $txt = str_replace('($enhedspris/$enhed)', '', $txt);
        $txt = str_replace('$enhedspris/$enhed', '', $txt);
    }
} else {
    $txt = str_replace('$enhedspris', dkdecimal($r['pris'] / $r['indhold']), $txt);
    $txt = str_replace('$enhed', $r['enhed'], $txt);
}
$txt = str_replace('$img', $img, $txt);
$txt = str_replace('$pris', dkdecimal($salgspris), $txt);
$txt = str_replace('$dkkpris', $dkkpris, $txt);
$txt = str_replace('$enhed', $r['enhed'], $txt);
$txt = str_replace('$varemrk', $r['trademark'], $txt);
$txt = str_replace('$indhold', $r['indhold'], $txt);
$txt = str_replace('$special_pris', $special_price, $txt);
$txt = str_replace('$special_fra_dato', dkdato($r['special_from_date']), $txt);
$txt = str_replace('$special_til_dato', dkdato($r['special_to_date']), $txt);
$txt = str_replace('$special_fra_tid', substr($r['special_from_time'], 0, 5), $txt);
$txt = str_replace('$special_til_tid', substr($r['special_to_time'], 0, 5), $txt);
$fp = fopen("../temp/{$db}/label.html", 'w');
fwrite($fp, $txt);
fclose($fp);
include "../temp/{$db}/label.html";
/*
if ($beskrivelse) { #Dymo
  print "<tr><td></td></tr>\n";
  print "<tr><td align=\"center\"><font face=\"verdana\" size=\"2\">$beskrivelse</font></td></tr>\n";
  print "<tr><td align=\"center\"><font face=\"verdana\" size=\"2\">Pris: ".dkdecimal($pris);
  if ($enhed && $indhold) {
		print " (".dkdecimal($pris/$indhold)."/$enhed)";
  }
  print "</font></td></tr>\n";
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:labelprint.php

示例12: valutaopslag

 function valutaopslag($amount, $valuta, $transdate)
 {
     global $connection;
     global $fejltext;
     $r = db_fetch_array(db_select("select * from valuta where gruppe = '{$valuta}' and valdate <= '{$transdate}' order by valdate desc", __FILE__ . " linje " . __LINE__));
     if ($r['kurs']) {
         $kurs = $r['kurs'];
         $amount = afrund($amount * $kurs / 100, 2);
         # decimal rettet fra 3 til 2 20090617 grundet fejl i saldi_58_20090617-2224
     } else {
         $r = db_fetch_array(db_select("select box1 from grupper where art = 'VK' and kodenr = '{$valuta}'", __FILE__ . " linje " . __LINE__));
         $tmp = dkdato($transdate);
         $fejltext = "---";
         print "<BODY onLoad=\"javascript:alert('Ups - ingen valutakurs for {$r['box1']} den {$tmp}')\">";
     }
     $r = db_fetch_array(db_select("select box3 from grupper where art = 'VK' and kodenr = '{$valuta}'", __FILE__ . " linje " . __LINE__));
     $diffkonto = $r['box3'];
     return array($amount, $diffkonto, $kurs);
     # 3'die parameter tilfojet 2009.02.10
 }
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:20,代码来源:std_func.php

示例13: while

    if ($fakturadate && $betalingsbet != "Efterkrav") {
        while (!checkdate($forfaldsmd, $slutdag, $forfaldsaar)) {
            $slutdag--;
            if ($slutdag < 27) {
                break 1;
            }
        }
        if ($betalingsbet != "Netto") {
            $forfaldsdag = $slutdag;
        }
        # Saa maa det vaere lb. md
        $forfaldsdag = $forfaldsdag + $betalingsdage;
        while ($forfaldsdag > $slutdag) {
            $forfaldsmd++;
            if ($forfaldsmd > 12) {
                $forfaldsaar++;
                $fortfaldsmd = 1;
            }
            $forfaldsdag = $forfaldsdag - $slutdag;
            $slutdag = 31;
            while (!checkdate($forfaldsmd, $slutdag, $forfaldsaar)) {
                $slutdag--;
                if ($slutdag < 27) {
                    break 1;
                }
            }
        }
    }
    $forfaldsdato = dkdato($forfaldsaar . "-" . $forfaldsmd . "-" . $forfaldsdag);
    $fakturadato = dkdato($fakturadate);
}
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:ordreopslag.php

示例14: db_select

    print "<td colspan=2 align=right><input type=submit accesskey=\"g\" value=\"Gem\" name=\"submit\" onclick=\"javascript:docChange = false;\"></td></tr>\n";
}
print "</td></tbody></table></td>";
#tabel3b slut;
print "<td colspan=4><textarea name=\"note\" rows=\"10\" cols=\"100\" onchange=\"javascript:docChange = true;\">{$notat}</textarea></td></tr>\n";
print "</form>";
$q = db_select("select * from historik where konto_id = {$id} order by kontaktet desc, id desc", __FILE__ . " linje " . __LINE__);
print "<tr><td colspan=6><hr></td></tr>";
while ($r = db_fetch_array($q)) {
    $ansat_id = $r['ansat_id'] * 1;
    $kontakt_id = $r['kontakt_id'] * 1;
    $ansat = str_replace(" ", "&nbsp;", $r1['navn']);
    $notedato = dkdato($r['notedate']);
    $kontaktet = dkdato($r['kontaktet']);
    if ($r['kontaktes']) {
        $kontaktes = dkdato($r['kontaktes']);
    } else {
        $kontaktes = '';
    }
    $r1 = db_fetch_array(db_select("select navn from ansatte where id = {$ansat_id}", __FILE__ . " linje " . __LINE__));
    $ansat = str_replace(" ", "&nbsp;", $r1['navn']);
    $r1 = db_fetch_array(db_select("select navn, tlf, mobil, email, notes from ansatte where id = {$kontakt_id}", __FILE__ . " linje " . __LINE__));
    $kontakt = str_replace(" ", "&nbsp;", $r1['navn']);
    $notat = str_replace("  ", "&nbsp;&nbsp;", htmlentities($r['notat'], ENT_COMPAT, $charset));
    $notat = str_replace("\n", "<br>", $notat);
    $dokument = $r['dokument'];
    print "<tr><td><table border=0 width=100%><tbody>";
    print "<tr><td colspan=2 width=100% >{$ansat}&nbsp;=&gt;<span title=\"D: {$r1['tlf']} M: {$r1['mobil']} E: {$r1['email']} B: {$r1['notes']}\">&nbsp;{$kontakt}</span></td></tr>";
    print "<tr><td colspan=2>{$kontaktet} &nbsp; {$kontaktes}</td></tr>";
    #	if ($r[notedate]==date("Y-m-d"))
    print "<tr><td><a href=historikkort.php?id={$id}&historik_id={$r['id']}&handling=ret>&nbsp;&nbsp;ret&nbsp;&nbsp;</a>&nbsp;&nbsp;&nbsp;<a href=historikkort.php?id={$id}&historik_id={$r['id']}&handling=slet onClick=\"return Slet()\">&nbsp;slet&nbsp;</a></td>";
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:31,代码来源:historikkort.php

示例15: varelinjer

function varelinjer($ordre_id, $faktdate, $udlign_date, $provision, $faktnr, $firmanavn, $pro_procent)
{
    global $kostkilde;
    $linje_id = array();
    #	$q1 = db_select("SELECT DISTINCT ordrelinjer.id as linje_id, ordrelinjer.vare_id as vare_id, ordrelinjer.antal as antal, ordrelinjer.pris as pris, ordrelinjer.rabat as rabat, varer.kostpris as kostpris, varer.gruppe as gruppe, batch_salg.batch_kob_id as batch_kob_id from ordrelinjer, varer, batch_salg where ordrelinjer.ordre_id='$ordre_id' and varer.id = ordrelinjer.vare_id and batch_salg.linje_id=ordrelinjer.id");
    $q1 = db_select("SELECT DISTINCT ordrelinjer.id as linje_id, ordrelinjer.vare_id as vare_id, ordrelinjer.antal as antal, ordrelinjer.pris as pris, ordrelinjer.rabat as rabat, varer.kostpris as kostpris, varer.gruppe as gruppe from ordrelinjer, varer where ordrelinjer.ordre_id='{$ordre_id}' and varer.id = ordrelinjer.vare_id");
    $y = 1000;
    while ($r1 = db_fetch_array($q1)) {
        if (!in_array($r1[linje_id], $linje_id)) {
            $y++;
            $linje_id[$y] = $r1['linje_id'];
            $pris[$y] = 0;
            $kostpris[$y] = 0;
            $pris[$y] = ($r1['pris'] - $r1['pris'] / 100 * $r1['rabat']) * $r1['antal'];
            $pris[$x] = $pris[$x] + $pris[$y];
            if ($kostkilde == 'kort') {
                $kostpris[$y] = $r1['kostpris'] * $r1['antal'];
                $kostpris[$x] = $kostpris[$x] + $kostpris[$y];
            } else {
                $r2 = db_fetch_array(db_select("SELECT box8 from grupper where art='VG' and kodenr = '{$r1['gruppe']}'"));
                if ($r2[box8] == 'on') {
                    $q3 = db_select("SELECT batch_salg.antal as antal, batch_kob.pris as kostpris from batch_kob, batch_salg where batch_salg.linje_id='{$r1['linje_id']}' and batch_kob.id=batch_salg.batch_kob_id");
                    while ($r3 = db_fetch_array($q3)) {
                        #		$r3=db_fetch_array(db_select("SELECT pris as kostpris from batch_kob where id= '$r1[batch_kob_id]'"));
                        $kostpris[$y] = $r3['kostpris'] * $r3['antal'];
                        # if ($faktnr==168) echo "168 - $pris[$y]=($r1[pris]-($r1[pris]/100*$r1[rabat]))*$r1[antal]  ---  $kostpris[$y]=$r3[kostpris]*$r3[antal]<br>";
                        # if ($faktnr==173) echo "173 - $pris[$y]=($r1[pris]-($r1[pris]/100*$r1[rabat]))*$r1[antal]  ---  $kostpris[$y]=$r3[kostpris]*$r3[antal]<br>";
                        # if ($faktnr==174) echo "174 - $pris[$y]=($r1[pris]-($r1[pris]/100*$r1[rabat]))*$r1[antal]  ---  $kostpris[$y]=$r3[kostpris]*$r3[antal]<br>";
                        $kostpris[$x] = $kostpris[$x] + $kostpris[$y];
                    }
                } else {
                    $kostpris[$y] = $r1['kostpris'] * $r1['antal'];
                    $kostpris[$x] = $kostpris[$x] + $kostpris[$y];
                }
            }
        }
    }
    $tmp = $pris[$x] - $kostpris[$x];
    $tmp2 = $tmp / 100 * $provision / 100 * $pro_procent;
    print "<tr><td>" . dkdato($faktdate) . "</td><td> " . dkdato($udlign_date) . "</td>";
    print "<td align=right onClick=\"javascript:d_ordre=window.open('../debitor/ordre.php?id={$ordre_id}','d_ordre','scrollbars=yes,resizable=yes,dependent=yes');d_ordre.focus();\" onMouseOver=\"this.style.cursor = 'pointer'\"><u><span title=\"{$firmanavn}\">{$faktnr}</span></u></td>";
    print "<td align=right>" . dkdecimal($kostpris[$x]) . "</td><td align=right>" . dkdecimal($pris[$x]) . "</td><td align=right>" . dkdecimal($tmp) . "</td><td align=right>" . dkdecimal($tmp2) . "</td></tr>";
    return array($pris[$x], $kostpris[$x], $tmp2);
}
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:44,代码来源:listeangivelse.php


注:本文中的dkdato函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。